[clug] usb drive file permissions

Francis Whittle fj.whittle at gmail.com
Sun Apr 24 21:06:41 MDT 2011

My experience with FAT formatted disks is that the permissions for the
entire filesystem must be determined at mount time using the umask mount
I believe that Ubuntu 10.10 uses "udisks" to handle removable media, in
this case if you know the device name of your drive you can set these,
for example my drive with device /dev/sdf1:

	udisks --unmount /dev/sdf1
	udisks --mount /dev/sdf1 --mount-options umask=011

This will set everything* available for the user mounting the
filesystem, and everything except the search (directory) and execute
(file) bits for their current group and everyone else.
The umask option is actually the chmod bits that should NOT be set,
defaulting normally to 077.  I'd recommend you probably want the search
bit available however, in which case you can split it up into dmask and
fmask options for directories and files respectively, with

	udisks --mount /dev/sdf1 --mount-options fmask=011,dmask=000


I'm not sure how to make this persistent though.

*Everything: There is an oddity with udisks that it will always mount a
FAT-based filesystem with the 'showexec' option (which disables the
execute bit for everything except files ending in .com, .exe, and .bat)
and has no simple way of disabling it.  Of course if you don't want
people running shell scripts and programs off the disk this is not a


On Mon, 2011-04-25 at 12:22 +1000, Adrian wrote:
> I am using ubuntu 10.10 and the file permissions on a USB drive are rwx --- ---. I want to change these to rwx rw rw. It cannot be 
> done with a chmod. How is this done, is it somewhere udev/rules.d/ ??
> Adrian

More information about the linux mailing list