1

I set up a Ubuntu 14.04 machine for my family.

I noticed that when I insert a USB key it gets automounted to /media/$username/$volumename. /media/$username has an ACL that only allows $username to access the medium, causing problems when switching users. The new user has no rights whatsoever, so the only options are pulling out the USB key and re-inserting it.

Googling, I found this: https://askubuntu.com/a/276670. Using this udev rule I managed to tell udisks2 to automount media to /media/$volumename. Still /media/$volumename has permissions set to 700, causing the same problems.

I suspect that udisks2 uses a restrictive umask for automounts. Does anyone know how to change the umask? Is there a possibility to set the group of the mount directory (so that I could use 770 permissions)?

/etc/fstab is not a solution, since this has to work for automounts of unknown media.

  • is there a reason not to use chmod / chown? – Tim Oct 19 '15 at 15:24
  • It’s not possible to change permissions on a FAT filesystem, they have to be set when mounting. – dlrlc Oct 19 '15 at 15:28
  • Of /media I mean – Tim Oct 19 '15 at 15:28
  • $volumename still will be 700. – dlrlc Oct 19 '15 at 15:29
  • 1
    @Cbhihe I can’t reformat anything, since this is supposed to work with USB keys from other people, too. – dlrlc Oct 21 '15 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.