How to set default permissions for automounted FAT drives in Ubuntu
Posted
by piman
on Super User
See other posts from Super User
or by piman
Published on 2010-04-25T03:20:10Z
Indexed on
2010/04/25
3:23 UTC
Read the original article
Hit count: 270
I've got many FAT32 drives that I'd like to mount in Ubuntu such that they have permission mode 700 for directories and 600 for all other files. By default, they have 755 for all files, which is not particularly useful since almost no non-directories should be executable, and it screws up version control repos hosted on the drives.
"Back in the day" I would have had the drives listed in /etc/fstab with the umask/dmask I want and there was no such thing as a default. These days, drives automount under their volume names. Which is great, except now I have no idea how to set the default.
I have tried changing the /system/storage/default_options/vfat/mount_options gconf key with no apparently effect. It was 077 initially but the mounted drive reflected a default of 022; changing it and re-inserting the drives resulted in the files still having permission bits of 755.
© Super User or respective owner