permissions on hotplug media

ZIYAD A. M. AL-BATLY zamb at saudi.net.sa
Sat Jun 4 20:42:43 UTC 2005


On Sat, 2005-06-04 at 16:49 +0200, Horst Schlonz wrote:
> removeable fat-media gets automounted with umask=077 an i plug it in.
> nobody but me can access the files, so i cannot share. this is bad.
> where can i change the setting to umask=000? i've found nothing
> in /etc/hotplug.
> 
> 
You could add the following line to “/etc/fstab”:
/dev/sda1 /media/sda1 auto defaults,noauto,noatime,nodev,noexec,nosuid,user,gid=plugdiv,dmask=007,fmask=117 0 0

and create the directory “/media/sda1”.
(If you want anyone to mount *and* unmount the device even if he/she is
not the one who mounted it, change “user” to “users” above.)
(The above line will give the permission 660 for files and 770 for
directories.  Files will be owned by the user who mounted the device,
and belongs to the group “plugdev”.)

However, there is a (small) catch to this.  If you plug any device to
your system that get assigned the “/dev/sda1” device, it will be treated
by the above rule even if it's not a FAT device.

I hope this help you.
Ziyad.




More information about the ubuntu-users mailing list