Announcement

Collapse
No announcement yet.

USB mounts only with root permissions

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

    USB mounts only with root permissions

    I formated USB to ext4 and relabeled it. Now it mounts only with root permissions

    Code:
    mount
    /dev/sdb1 on /media/adata type ext4 (rw,nosuid,nodev,uhelper=udisks)
    /media$ ls -l
    drwxr-xr-x  3 root    root   4096 sty  4 18:41 adata
    As comparison, other USB with Fat32 mounts with "normal" permissions and I can manage files without problems on different users accounts.
    Code:
    drwx------ 14 gnomek  gnomek 32768 sty  4 19:36 KINGSTON
    
    /dev/sdb1 on /media/KINGSTON type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)
    What can I do about it?

    #2
    You don't say which version of Kubuntu you're using or how you're mounting the sticks.

    What I see here (13.04) is; if I mount the USB stick manually, I get your results. If I use the Device manager and click on "open with Dolphin" I get user permissions on the device.

    Likely, this is because FAT32 doesn't support user permissions, so the defaults to the user. Since super user rights are required to mount a device, when you mount it manually, it defaults to root when the file system supports it. The device manager sets the permissions to user for you.

    You can either mount it using the dolphin action or edit the udev rules to set USB devices to a user id.

    Slightly off-topic: Why use ext4 for a stick? IMO, you don't need journaling on a device that small. You'll get better performance and more space from ext2.
    Last edited by oshunluvr; Jan 04, 2014, 02:50 PM.

    Please Read Me

    Comment


      #3
      the extX file systems use linux/unix permissions , vfat dose not , you were root/sudo when making the ext4 file system so it took root permission .

      open a root dolphin (kdesudo dolphin) and change it .

      VINNY
      i7 4core HT 8MB L3 2.9GHz
      16GB RAM
      Nvidia GTX 860M 4GB RAM 1152 cuda cores

      Comment


        #4
        You also have to change permissions on the mount point.
        Code:
        chmod -R 777 /media/adata
        EXT4 will still set the user ID and group ID of the who/whatever creates files, and (in most cases) the permissions on those files will be 644.

        I'd encourage you not to use EXT4 for a USB drive. The purpose of an external drive is to be portable from machine to machine; using a filesystem that always assigns permissions and owners rather defeats this purpose. Furthermore, EXT4's journaling process will cause more writes to the drive and take up space. Stick with FAT-32.

        Comment


          #5
          Originally posted by SteveRiley View Post
          You also have to change permissions on the mount point.
          Code:
          chmod -R 777 /media/adata
          EXT4 will still set the user ID and group ID of the who/whatever creates files, and (in most cases) the permissions on those files will be 644.

          I'd encourage you not to use EXT4 for a USB drive. The purpose of an external drive is to be portable from machine to machine; using a filesystem that always assigns permissions and owners rather defeats this purpose. Furthermore, EXT4's journaling process will cause more writes to the drive and take up space. Stick with FAT-32.
          oops ,,,yup +1

          VINNY
          i7 4core HT 8MB L3 2.9GHz
          16GB RAM
          Nvidia GTX 860M 4GB RAM 1152 cuda cores

          Comment


            #6
            Thank you for help. Problem solved. I am aware that fat32 would be a better choice but I did it intentionally, for special purpose.

            Comment

            Working...
            X