Announcement

Collapse
No announcement yet.

External USB HD/partition ownership issue quirk and fix

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

    #16
    Re: External USB HD/partition ownership issue quirk and fix

    I'm sorry, but my 'gut' tells me that the behavior I've described concerning how the system handled access to these USB HDs is wrong.

    It should not matter one whit who tries to access the USB HD. The only thing that should matter is whether the user accessing the USB HD has the permissions to do so - belongs to the group allowing access to pluggable devices. That implies that ownership of the device is dynamic, changing with each authorized user who accesses it. However, ownership of data on the device is static. Data that shows ownership of paulaul can't be accessed/managed by user john:john unless john also belongs to group paul. This is how Linux works with data.

    I just wonder if my having these USB HDs plugged in all the time, and so present to the system when the laptop is booted, is affecting how they are managed. Easy enough to test. I'll just reformat the 60GB drive with GParted and then disconnect it before rebooting the laptop. Once logged in, I'll plug it in and see if the ownership is reflected as paul:root - which I say it should be.
    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


      #17
      Re: External USB HD/partition ownership issue quirk and fix

      Originally posted by dibl
      ....
      But, equally true, any of the 25 legitimate users can open the device itself (not the folder), right? Why? Because it's just a USB storage device, and anyone who can log on to the computer, and is a member of the default groups, can plug in a USB storage device and have at it.
      Plugging it in and mounting it is one thing, converting all files saved to it as root:root ownership and changing the permissions from what ever the user had to rxwrxwrxw is just flat out wrong.

      The device itself does not have permissions that are specific to any given user.
      No, but after a user mounts it they should have access to all folders and files which they own or create, but to no others. Further more, when they copy a file from their home account to the USB storage device their ownership and permissions should NOT change.

      As present in my home account:
      /home/jerry/filename.jpg jerry:jerry rwx------ (others in my group and the world are prevented from access)
      As copied to the USB HD:
      /media/My Passport/filename.jpg root:root rwxrrwxrwx
      As copied back to my home account:
      /home/jerry/filename.jpg jerry:jerry rwxrwxrwx


      This is entirely against my past experience with Linux. The conversion of the ownership to root:root, combined with the fact that WORLD is given rwx permission, gives ANYONE who mounts that USB HD access to my files! Not only that, since WORLD has rwx permission ANYONE could access filename.jpg and edit it, yet the ownership and permission would not change, only the time stamp.

      THAT IS NOT RIGHT NOR IS IT ACCEPTABLE! It is, in the LEAST, a security breach.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #18
        Re: External USB HD/partition ownership issue quirk and fix

        Hmmmm -- well, it's an interesting conundrum -- raises some issues I'd never really considered.

        Note that if you do the same maneuver with a USB memory stick that is formatted FAT, there's no permissions issue because FAT does not support unix permissions.

        I'm not sure concern about data security is entirely consistent with using a portable USB hdd, really. While it's very convenient, from a/my security perspective, it's kind of like carrying your cash in a sandwich bag. :P

        Comment


          #19
          Re: External USB HD/partition ownership issue quirk and fix

          Originally posted by Snowhog
          Easy enough to test. I'll just reformat the 60GB drive with GParted and then disconnect it before rebooting the laptop. Once logged in, I'll plug it in and see if the ownership is reflected as paul:root - which I say it should be.
          Well, I performed the test. Reformatted the drive with GParted. Performed a shutdown (poweroff) of the laptop. Disconnected the reformatted USB HD. Booted the laptop. Logged in to the Desktop. Opened Dolphin. Plugged in the USB HD. The Device Notifier popped up showing the connected device, and it appeared in Dolphin under Places. Clicked on it and then attempted to create a file (right-click > Create New), but the option to do this is grayed out.

          The connected USB HD is mounted as /media/disk. Navigating to /media and right-clicking on disk > Properties > Permissions shows that Ownership is User: root and Group: root.

          In order for me, the logged in user who connected the USB HD to gain access to this HD, I have to, in /media, right-click on disk (the mountpoint created by the system), select Root Actions > Ownership to... > No and type in paul:root, and type in my password. Then and only then do I have read and write access to the drive.

          Again, having to go through this process is not normal, and definitely not expected. A novice Linux user would not be expected to know that this was necessary. And I say it shouldn't be necessary. I still say this behavior is aberrant.
          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


            #20
            Re: External USB HD/partition ownership issue quirk and fix

            Originally posted by dibl
            .....
            Note that if you do the same maneuver with a USB memory stick that is formatted FAT, there's no permissions issue because FAT does not support unix permissions.

            I'm not sure concern about data security is entirely consistent with using a portable USB hdd, really. While it's very convenient, from a/my security perspective, it's kind of like carrying your cash in a sandwich bag. :P
            I plugged in two USB memory sticks. A 2 GB Kingston formatted with "Win95 FAT16 (LBS)" by Kingston, and an 8 GB Toshiba formatted by me to EXT4. My tests show that both work as expected. ownership and permissions are retained as they were on the home account and interactions are as one expects.

            I did notice that with the "My Passport" HD connected to the USB port I can open the properties dialog on a file but all options to modify the file or its permissions are blocked unless I do so as root. BUT, I created a "Test" account and from it I could still copy any "root:root rwxrwxrwx" file to the test account and in doing so its ownership changes to test:test. THEN, I could modify it without problems. Copying it back to the "My Passport" resulted in the ownership being converted back to root:root and the permissions to rwxrwxrwx. Only the time stamp shows any activity took place on the test file.

            FOR USB Hard disks (not memory sticks) there is a definite problem with ownership and permissions.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #21
              Re: External USB HD/partition ownership issue quirk and fix

              Originally posted by GreyGeek
              FOR USB Hard disks (not memory sticks) there is a definite problem with ownership and permissions.
              Thank you. I heartily agree. This is a problem - a true bug IMO. So where should it be reported: launchpad or bugs.kde?
              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


                #22
                Re: External USB HD/partition ownership issue quirk and fix

                Tough question!

                IF it is because of KDE's treatment of the USB HD then KDE.bug, BUT, if it is because of Kubuntu's udev then launchpad.

                IF it is a KDE problem then other distros running KDE 4.4.x will have the same problem. IF they don't then the problem is Kubuntu's.

                Start with launchpad, see if they point a finger upstream!
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #23
                  Re: External USB HD/partition ownership issue quirk and fix

                  Originally posted by GreyGeek
                  Start with launchpad, see if they point a finger upstream!
                  I've accounts on both. I'll post on launchpad later this evening and see where it goes. I'll post the bug # so you, and anyone else who can confirm this behavior, can also chime in.

                  Geez! It now looks as if Launchpad only accepts reporting of bugs via email! And you have to have a GPG key pair, with the public key published to their site, before you can do so. What happened to the Web reporting?
                  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


                    #24
                    Re: External USB HD/partition ownership issue quirk and fix

                    Will do.
                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment


                      #25
                      Re: External USB HD/partition ownership issue quirk and fix

                      No, but after a user mounts it they should have access to all folders and files which they own or create, but to no others.
                      I agree with that completely. If I read the rest of the thread after the above correctly, then I would say that there is an issue. If you copied a file you created that is Owned and Rights Only to are you, moving it shouldn't change that. From what GG said it does and that is wrong.

                      Comment


                        #26
                        Re: External USB HD/partition ownership issue quirk and fix

                        Originally posted by Snowhog
                        Geez! It now looks as if Launchpad only accepts reporting of bugs via email! And you have to have a GPG key pair, with the public key published to their site, before you can do so. What happened to the Web reporting?
                        Forget this. Found out how you report via Web. You have to click on Help > Report Bug... from a running application. :P

                        Anyway, bug has been reported: Bug 234217
                        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


                          #27
                          Re: External USB HD/partition ownership issue quirk and fix

                          Added my two bits!
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #28
                            Re: External USB HD/partition ownership issue quirk and fix

                            Does it really matter who owns a file or folder on a removable device anyway?
                            On my computer root is user id 0 (and on probably every other linux computer around). Root on my computer can open any file, root on any other linux computer can open any root owned or other owned file on a removable device plugged into it. So, basically anyone with root access can access any file on any removable device, stolen or otherwise.
                            Files I write to a usb drive are owed by me (UID 1000) on most of my work computers UID is user administrator so they can open any file I own on a removable drive plugged into their computer as the UID matches. My wife is UID 1000 on her computer ......
                            If you don't want anyone else accessing your files on a removable drive the only option is to encrypt the files or the folder they are in. As soon as the files are moved to another computer (or even the same computer that was booted from a live CD where the default use has root permissions) the UID is irrelevant as you have no control over how that computer is set up.

                            Comment


                              #29
                              Re: External USB HD/partition ownership issue quirk and fix

                              Originally posted by peterroots
                              Does it really matter who owns a file or folder on a removable device anyway?
                              I agree peter. A removable device is not part of any specific system -- it is only a temporary visitor to whichever system it gets plugged into. It does not have any information about the administrator and authorized users -- user names and group names are therefore irrelevant to a removable device. The files I (the user) save to USB thumb drives are all UID 1000, and of course anyone who has my thumb drive can plug it in and see/delete everything on it. That's the design of removable devices.

                              Comment


                                #30
                                Re: External USB HD/partition ownership issue quirk and fix

                                The only time that it matters if the removable drive has the correct permissions / ownership is if you try to copy the files from the removeable drive to your filesystem and the ownership of the files in the destination is wrong.

                                Comment

                                Working...
                                X