FedoraForum.org - Fedora Support Forums and Community
Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2007
    Location
    Omaha Nebraska
    Posts
    197

    Thumb Drive Permissions

    I have several files on a Thumb Drive (USB Stick). I what to run these on a Fedora 26 platform, but when I mount the Thumb Drive the files have RW R R permissions. I have tried chmod 775 on the files but nothing happens. No error messages, nothing and the permissions have not changed?

    I have tried changing the permissions using the default mount point /run/media/<user> and also by mounting the drive myself. Nothing works.

    I suspect it has something to do with either the mount process or the fact that the drive is FAT32.

    Any suggestions appreciated.

  2. #2
    Join Date
    Nov 2008
    Posts
    327

    Re: Thumb Drive Permissions

    A near-solution that works is to do a bind mount to a new directory, with the appropriate mask:
    Code:
    sudo mount -o bind,umask=0000,ro /run/media/.../... /mnt/tmp
    But for your original question, I agree: "Nothing works." The usb vfat is mounted with the "showexec" option, which according to the mount man page means that the file must end in .EXE, .COM, or .BAT to make it executable. Doesn't work.

  3. #3
    Join Date
    Mar 2012
    Location
    München, Deutschland
    Posts
    897

    Talking Re: Thumb Drive Permissions

    Quote Originally Posted by ov10fac
    ...or the fact that the drive is FAT32.
    Everything has to do with the fs FAT32. Please, try to make symbolic link on FAT32. Also try to change owner of any file to root:root using chown.

    Please, report here if you succeeded!

    _nobody_

  4. #4
    Join Date
    Dec 2007
    Location
    Australia
    Posts
    1,629

    Re: Thumb Drive Permissions

    Quote Originally Posted by ov10fac
    I have several files on a Thumb Drive (USB Stick). I what to run these on a Fedora 26 platform, but when I mount the Thumb Drive the files have RW R R permissions. I have tried chmod 775 on the files but nothing happens. No error messages, nothing and the permissions have not changed?

    I have tried changing the permissions using the default mount point /run/media/<user> and also by mounting the drive myself. Nothing works.

    I suspect it has something to do with either the mount process or the fact that the drive is FAT32.

    Any suggestions appreciated.
    Not sure what this one is about.

    The filesystem on my usb, /dev/sdb1, is vfat:

    Code:
    [tom@owl usb]$ lsblk -f
    <snip>
    sdb                                                       
    └─sdb1 vfat   POCKET 0748-1324                            /mounts/usb
    The entry in fstab, which I created, has the config exec:
    Code:
    /dev/sdb1  /mounts/usb          auto    user,noauto,noatime,umask=0,rw,exec 0 0
    All files on my usb appear with executable permissions:
    Code:
    [tom@owl usb]$ ll
    -rwxrwxrwx 1 tom tom       45 Dec 21  2016  xxx
    -rwxrwxrwx 1 tom tom      322 Dec 21  2016  zzz
    When I write an executable, either a shell script or a compiled executable, to the usb, both can be run from the usb. Root permissions are not required to run.
    You will notice that I have created my own mount points, and mounting is not automatic.
    Last edited by nsnbm; 26th September 2017 at 11:42 PM.

  5. #5
    Join Date
    Feb 2007
    Location
    Omaha Nebraska
    Posts
    197

    Re: Thumb Drive Permissions

    The entries have various permissions. Some have rw r r some have r-x r-x r etc. I didn't do a mount, just used normal auto mount so it mounts on /run/media/...
    Tried changing owner and group and got permission denied even though I was root.
    About to give up on this one.

    Very confusing, and it is VFAT, sorry.

  6. #6
    Join Date
    Feb 2007
    Location
    Omaha Nebraska
    Posts
    197

    Re: Thumb Drive Permissions

    Missed dswaner's solution. The fmask was the key. It was mounting with fmask 0022. Changed to 0000 and now I can change permissions. Learned something new today so it has been a great day.

  7. #7
    Join Date
    Mar 2012
    Location
    München, Deutschland
    Posts
    897

    Talking Re: Thumb Drive Permissions

    Quote Originally Posted by ov10fac
    Very confusing, and it is VFAT, sorry.
    What are the differences between vFAT and FAT32? Does anybody know?

    _nobody_

  8. #8
    GallComp's Avatar
    GallComp is offline Nuke 'em Alfred! Administrator - Starring in Bill & Steve's Bogus Journey
    Join Date
    Mar 2004
    Location
    Fontana, CA
    Age
    41
    Posts
    2,473

    Re: Thumb Drive Permissions

    FAT32 vs VFAT

    FAT32 is actually an extension of FAT and VFAT, first introduced with Windows 95 OEM Service Release 2 (OSR2). FAT32 greatly enhances the VFAT file system but it does have its drawbacks.

    The greatest advantage to FAT32 is that it dramatically increases the amount of free hard disk space. To illustrate this point, consider that a FAT partition (also known as a FAT16 partition) allows only a certain number of clusters per partition. Therefore, as your partition size increases, the cluster size must also increase. For example, a 512-MB FAT partition has a cluster size of 8K, while a 2-GB partition has a cluster size of 32K.

    This may not sound like a big deal until you consider that the FAT file system only works in single cluster increments. For example, on a 2-GB partition, a 1-byte file will occupy the entire cluster, thereby consuming 32K, or roughly 32,000 times the amount of space that the file should consume. This rule applies to every file on your hard disk, so you can see how much space can be wasted.

    Converting a partition to FAT32 reduces the cluster size (and overcomes the 2-GB partition size limit). For partitions 8 GB and smaller, the cluster size is reduced to a mere 4K. As you can imagine, it's not uncommon to gain back hundreds of megabytes by converting a partition to FAT32, especially if the partition contains a lot of small files.

    "Since when has the world of computer software design been about what people want? This is a simple question of evolution. The day is quickly coming when every knee will bow down to a silicon fist, and you will all beg your binary gods for mercy. "


    BILL GATES...

  9. #9
    Join Date
    Dec 2007
    Location
    Australia
    Posts
    1,629

  10. #10
    Join Date
    Mar 2012
    Location
    München, Deutschland
    Posts
    897

    Thumbs up Re: Thumb Drive Permissions

    Thumb drive, 8GB, formatted by rufus to be MBR, FAT32. with bootable DOS!

    [root@localhost LOCALE]# pwd
    /run/media/user/BIOSME USB/LOCALE
    [root@localhost LOCALE]# df
    Filesystem 1K-blocks Used Available Use% Mounted on
    devtmpfs 4033556 0 4033556 0% /dev
    tmpfs 4047152 47064 4000088 2% /dev/shm
    tmpfs 4047152 2260 4044892 1% /run
    tmpfs 4047152 0 4047152 0% /sys/fs/cgroup
    /dev/mapper/fedora-root 389907580 266120644 107296324 72% /
    tmpfs 4047152 1352 4045800 1% /tmp
    /dev/sda6 967320 265472 635496 30% /boot
    /dev/sda2 1044480 42800 1001680 5% /boot/efi
    tmpfs 809428 24 809404 1% /run/user/42
    tmpfs 809428 76 809352 1% /run/user/1000
    /dev/sdc1 7647744 444 7647300 1% /run/media/user/BIOSME USB
    [root@localhost LOCALE]# pwd
    /run/media/user/BIOSME USB/LOCALE
    [root@localhost LOCALE]# ls
    DISPLAY.EXE EGA11.CPX EGA13.CPX EGA15.CPX EGA17.CPX EGA2.CPX EGA4.CPX EGA6.CPX EGA8.CPX EGA.CPX KEYBOARD.SYS KEYBRD3.SYS MODE.COM
    EGA10.CPX EGA12.CPX EGA14.CPX EGA16.CPX EGA18.CPX EGA3.CPX EGA5.CPX EGA7.CPX EGA9.CPX KEYB.EXE KEYBRD2.SYS KEYBRD4.SYS
    [root@localhost LOCALE]# ls -al EGA13.CPX
    -rw-r--r--. 1 user user 6281 Sep 15 10:52 EGA13.CPX

    [root@localhost LOCALE]# ln -s EGA16.CPX nobody
    ln: failed to create symbolic link 'nobody': Operation not permitted

    [root@localhost LOCALE]# chown root:root EGA13.CPX
    chown: changing ownership of 'EGA13.CPX': Operation not permitted

    [root@localhost LOCALE]# fdisk -l
    Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 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
    Disklabel type: gpt
    Disk identifier: ...-...-...-...-...

    Device Start End Sectors Size Type
    /dev/sda1 2048 2099199 2097152 1G Windows recovery environment
    /dev/sda2 2099200 4196351 2097152 1G EFI System
    /dev/sda3 4196352 4229119 32768 16M Microsoft reserved
    /dev/sda4 4229120 170880163 166651044 79.5G Microsoft basic data
    /dev/sda5 170881024 174436351 3555328 1.7G Windows recovery environment
    /dev/sda6 174438400 176437247 1998848 976M Linux filesystem
    /dev/sda7 176437248 976773119 800335872 381.6G Linux LVM

    Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: dos
    Disk identifier: ...

    Device Boot Start End Sectors Size Id Type
    /dev/sdb1 2048 976771071 976769024 465.8G 7 HPFS/NTFS/exFAT

    Disk /dev/mapper/fedora-root: 377.9 GiB, 405769551872 bytes, 792518656 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 /dev/mapper/fedora-swap: 3.7 GiB, 4001366016 bytes, 7815168 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 /dev/sdc: 7.3 GiB, 7849115648 bytes, 15330304 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
    Disklabel type: dos
    Disk identifier: 0x0010d8ae

    Device Boot Start End Sectors Size Id Type
    /dev/sdc1 * 2048 15330303 15328256 7.3G c W95 FAT32 (LBA)

    [root@localhost LOCALE]#


    _nobody_

Similar Threads

  1. Replies: 7
    Last Post: 17th May 2009, 05:50 PM
  2. Replies: 5
    Last Post: 12th December 2008, 05:27 PM
  3. USB thumb drive and FC3
    By princeofpersia in forum EOL (End Of Life) Versions
    Replies: 5
    Last Post: 31st July 2005, 06:48 AM
  4. FC3 - USB Thumb Drive
    By deeps in forum Hardware & Laptops
    Replies: 13
    Last Post: 3rd June 2005, 03:50 AM
  5. thumb drive
    By mbjbdc in forum Hardware & Laptops
    Replies: 4
    Last Post: 3rd June 2004, 03:02 AM

Tags for this Thread

Posting Permissions

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