Announcement

Collapse
No announcement yet.

USB screw ups

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Nothing I can find
    Greg
    W9WD

    Comment


      #47
      I just did a fresh install of 18.04 on a spare hard drive I have and everything works just fine.
      So it's not the hardware. That's a good thing.
      Greg
      W9WD

      Comment


        #48
        Interesting. So, instead of looking for a BIOS setting, the question remains: what "setting" in Kubuntu controls this stuff?
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #49
          Indeed!
          Greg
          W9WD

          Comment


            #50
            I'm leaving tomorrow to go fetch the last load of household stuff (from WA) in our big move to NM.
            So I won't be on the computer for the next week or so, after today.

            Maybe the computer gnomes will come buy and fix it while I'm gone.
            Greg
            W9WD

            Comment


              #51
              Back now permanently.
              The computer gnomes have not come by yet.

              Is there a way to change permissions from "root" to me?
              Greg
              W9WD

              Comment


                #52
                For some reason my computer does not think I am the owner and so it will not allow me to change permissions?
                How do I tell it that yes, I am the owner?
                Greg
                W9WD

                Comment


                  #53
                  sudo chown $USER:$USER /media/<username>/<mountpoint>
                  If you think Education is expensive, try ignorance.

                  The difference between genius and stupidity is genius has limits.

                  Comment


                    #54
                    So
                    sudo chown $USER:$USER /media/<username>/<mountpoint>
                    would be
                    sudo chown $greg:$greg /media/greg/8gb
                    ?
                    Greg
                    W9WD

                    Comment


                      #55
                      Tried
                      sudo chown $greg:$greg /media/greg/8gb
                      and
                      sudo chown $greg:$greg /media/greg/

                      neither had an effect
                      Greg
                      W9WD

                      Comment


                        #56
                        I'm about ready to reformat and start over.
                        This is crazy
                        Greg
                        W9WD

                        Comment


                          #57
                          Use command lsblk to show your path/mount point.
                          If you think Education is expensive, try ignorance.

                          The difference between genius and stupidity is genius has limits.

                          Comment


                            #58
                            Originally posted by GregM View Post
                            I'm about ready to reformat and start over.
                            This is crazy
                            No need to do that and it's not crazy. There's no need to change this. If you reinstall, it's going to be the same because it's that way by design. You can't change it because it's permissions and ownership are "locked" and you're not using the correct command to unlock it first.

                            It is locked because you (you the empirical user, not specifically you Greg) are not supposed to be mucking about in the media folder. It's done that way to keep other users from accessing your removable devices. When you insert a device root (via UDEV) mounts the device in your /media/greg folder with permission that you can access.

                            Here's what my /media folder looks like with nothing mounted:
                            Code:
                            [FONT=monospace][COLOR=#54FF54][B]stuart@office[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454FF][B]~[/B][/COLOR][COLOR=#000000]$ ll /media[/COLOR]
                            total 0
                            drwxr-xr-x  1 root root  12 Nov  9 08:26 [COLOR=#5454FF][B].[/B][/COLOR][COLOR=#000000]/[/COLOR]
                            drwxr-xr-x  1 root root 268 Nov 23 08:50 [COLOR=#5454FF][B]..[/B][/COLOR][COLOR=#000000]/[/COLOR]
                            drwxr-x---+ 1 root root   0 Dec  2 19:45 [COLOR=#5454FF][B]stuart[/B][/COLOR][COLOR=#000000]/[/COLOR][/FONT]
                            (NOTE: I believe this user folder under /media is created when you log in. Thus, multiple users could have a folder in there at the same time if a second "session" is created)

                            Clearly, root owns the stuart folder and the zero after "root root" shows us nothing is in the stuart folder. Now with a device inserted and mounted, we see:
                            Code:
                            [FONT=monospace][COLOR=#54FF54][B]stuart@office[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454FF][B]~[/B][/COLOR][COLOR=#000000]$ ll /media/[/COLOR]
                            total 0
                            drwxr-xr-x  1 root root  12 Nov  9 08:26 [COLOR=#5454FF][B].[/B][/COLOR][COLOR=#000000]/[/COLOR]
                            drwxr-xr-x  1 root root 268 Nov 23 08:50 [COLOR=#5454FF][B]..[/B][/COLOR][COLOR=#000000]/[/COLOR]
                            drwxr-x---+ 1 root root  22 Dec 14 15:59 [COLOR=#5454FF][B]stuart[/B][/COLOR][COLOR=#000000]/[/COLOR][/FONT]
                            The zero has changed to 22, indicating some stuff is under stuart now, and here it is:
                            Code:
                            [FONT=monospace][COLOR=#54FF54][B]stuart@office[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454FF][B]~[/B][/COLOR][COLOR=#000000]$ ll /media/stuart/[/COLOR]
                            total 4
                            drwxr-x---+ 1 root   root     22 Dec 14 15:59  [COLOR=#5454FF][B].[/B][/COLOR][COLOR=#000000]/[/COLOR]
                            drwxr-xr-x  1 root   root     12 Nov  9 08:26  [COLOR=#5454FF][B]..[/B][/COLOR][COLOR=#000000]/[/COLOR]
                            drwxrwxrwx  1 stuart stuart 4096 Dec 13 11:42 [COLOR=#1818b2]'Samsung USB'[/COLOR][COLOR=#000000]/[/COLOR][/FONT]
                            Notice the ownership and permissions of my thumb drive mount point are fully open to me. Thus, having /media/stuart restricted to only those in my group (which is only me by Ubuntu default) prevents others from accessing my devices while they're mounted there. I don't understand why you think you need to change this because it works fine (and is more secure) if you leave it alone, but anyway...

                            ...the short answer as to why you can't change the folder the way you're trying is an "Access Control List" (ACL) is being used. The hint is the plus sign trailing the normal permissions list. Look at mine and see (I enlarged the plus sign):
                            Code:
                            [FONT=monospace][COLOR=#000000]drwxr-x---[SIZE=4][B]+[/B][/SIZE] 1 root root  22 Dec 14 15:59 [/COLOR][COLOR=#5454FF][B]stuart[/B][/COLOR][COLOR=#000000]/[/COLOR][/FONT]
                            If you look at the ACL you'll see:

                            Code:
                            [FONT=monospace][COLOR=#54FF54][B]stuart@office[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454FF][B]~[/B][/COLOR][COLOR=#000000]$ getfacl /media/stuart    [/COLOR]
                            getfacl: Removing leading '/' from absolute path names
                            # file: media/stuart
                            # owner: root
                            # group: root
                            [B]user::rwx
                            user:stuart:r-x[/B]
                            group::---
                            mask::r-x
                            other::---[/FONT]


                            So you can see that although root "owns" the folder, I have been given access through the ACL.

                            To further general ACL knowledge and possibly to give you a better understanding of what you're encountering: https://linuxconfig.org/how-to-manage-acls-on-linux

                            If you really, really, REALLY want to continue mucking about, go right ahead - it's your system. However, at least generally, changing things in your linux install basically just because you don't like the way it looks is a bad idea IMO. I know because I've done numerous re-installs over the last 20 years that I've used linux for blindly taking the same sort of actions.

                            My advice, if you want it, is ask yourself why you're doing something before finding out how to do it, and then only act when your understanding is clear and your reasons justified.
                            Last edited by oshunluvr; Dec 14, 2018, 03:27 PM.

                            Please Read Me

                            Comment


                              #59
                              Originally posted by GregM View Post
                              So
                              sudo chown $USER:$USER /media/<username>/<mountpoint>
                              would be
                              sudo chown $greg:$greg /media/greg/8gb
                              ?
                              No. $USER is an environment variable that translates to the current logged in user; you. If you specify your login name directly, don't put a $ in front of it. Incorrect: $greg Correct: greg
                              Windows no longer obstructs my view.
                              Using Kubuntu Linux since March 23, 2007.
                              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                              Comment


                                #60
                                Originally posted by SpecialEd View Post
                                Use command lsblk to show your path/mount point.
                                greg@greg-OptiPlex-990:~$ lsblk

                                NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
                                sda 8:0 0 83.9G 0 disk
                                └─sda1 8:1 0 83.9G 0 part /
                                sdb 8:16 1 7.3G 0 disk
                                └─sdb1 8:17 1 7.3G 0 part /media/greg/8GB
                                sr0 11:0 1 1024M 0 rom

                                greg@greg-OptiPlex-990:~$
                                Greg
                                W9WD

                                Comment

                                Working...
                                X