Results 1 to 5 of 5

Thread: how do I change usb device permissions?

  1. #1

    Default how do I change usb device permissions?

    oS v13.1_x64 - KDE. I have an external usb HD originally formatted FAT32. I want to change it to ext4 and am part way there. My hang up is permissions.

    This device (sdf1) originally mounted to /var/run/media/$User/LabelName

    As root I did
    Code:
    mkfs -t ext4 /dev/sdf1
    I then used YaST partition manager to edit the partition and gave it a name and mounting point same as above.
    While this works fine logged in a root it has other problems that I need to resolve.

    Ordinarily, these devices auto mount and are r/w by the user. And they can be ejected. And they have no entry in fstab.

    The YaST partitioner required me to enter a mounting point and it entered that info into fstab.
    And upon ejection it want my root authenication. I presume this is due to being logged in as $user.
    Is there some kind of MBR entry that determines how these devices autoload? Or

    From my mount cmd:
    Code:
    /dev/sdf1 on /var/run/media/jon/Seagate1Tb type ext4 (rw,relatime,data=ordered)
    A FAT32 device mounted shows this and has no entry in fstab:
    Code:
    /dev/sdg1 on /run/media/jon/Seagate15tb type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
    So I can see that the fat32 device knows it was mounted with my own userID.

    fdisk shows the following for my HD, the problem USB device, and the FAT32 USB device:
    Code:
    fdisk -l
    
    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0xf44763df
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1              63       80324       40131   16  Hidden FAT16
    /dev/sda2   *       81920  1953523711   976720896    f  W95 Ext'd (LBA)
    /dev/sda5           83968    16883711     8399872   82  Linux swap / Solaris
    /dev/sda6        16885760    58830847    20972544   83  Linux
    /dev/sda7        58832896  1953503231   947335168   83  Linux
    
    Disk /dev/sdf: 1000.2 GB, 1000204885504 bytes, 1953525167 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0x000d4543
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdf1            2048  1953521663   976759808   83  Linux
    
    Disk /dev/sdg: 1500.3 GB, 1500301909504 bytes, 2930277167 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0xb185db18
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdg1              63  2930272064  1465136001    c  W95 FAT32 (LBA)
    What can I do to fix this problem?
    Jon

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,336
    Blog Entries
    15

    Default Re: how do I change usb device permissions?

    On Wed 27 Nov 2013 02:16:02 AM CST, 6520302 wrote:


    oS v13.1_x64 - KDE. I have an external usb HD originally formatted
    FAT32. I want to change it to ext4 and am part way there. My hang up
    is permissions.

    This device (sdf1) originally mounted to /var/run/media/$User/LabelName

    <snip>

    What can I do to fix this problem?
    Jon


    Hi
    You don't need a mount point, just format and add a disk label. I
    normally create a top directory and give my user ownership via chown.
    Then just let the automount do it's thing.

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLED 11 SP3 (x86_64) GNOME 2.28.0 Kernel 3.0.101-0.8-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  3. #3

    Default Re: how do I change usb device permissions?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    You don't need a mount point, just format and add a disk label. I
    normally create a top directory and give my user ownership via chown.
    Then just let the automount do it's thing.
    Malcolm:

    Thanks, using chown allows me to get what I expected and the usb hd automounts and ejects properly.

    The mount point is still in fstab.

    I was looking at parted but that doesn't seem to format ext4. Or can I just remove the fstab entry and expect the same results w/o doing another format?

    Jon

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,336
    Blog Entries
    15

    Default Re: how do I change usb device permissions?

    On Wed 27 Nov 2013 03:36:01 AM CST, 6520302 wrote:


    malcolmlewis;2602485 Wrote:
    > Hi
    > You don't need a mount point, just format and add a disk label. I
    > normally create a top directory and give my user ownership via chown.
    > Then just let the automount do it's thing.
    >


    Malcolm:

    Thanks, using chown allows me to get what I expected and the usb hd
    automounts and ejects properly.

    The mount point is still in fstab.

    I was looking at parted but that doesn't seem to format ext4. Or can I
    just remove the fstab entry and expect the same results w/o doing
    another format?

    Jon


    Hi
    You should expect the same result removing the fstab entry, as long as
    you have set the label, it should mount under the media directory

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLED 11 SP3 (x86_64) GNOME 2.28.0 Kernel 3.0.101-0.8-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  5. #5

    Default Re: how do I change usb device permissions?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    You should expect the same result removing the fstab entry, as long as
    you have set the label, it should mount under the media directory
    Malcolm:

    That seems to take care of it.
    THANKS,
    jon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •