Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some USB-sticks using fat32 as filesystem and others using ext4. Now I want to configure autofs to mount the sticks automatically.

To make sure that the user can write to fat32 sticks I use the umask option in my /etc/auto.misc file. However (according to the mount man page), this option is not available for ext4 file systems and when I try to automount an ext4 stick this way I get an error message (via dmesg | tail) which tells me that umask is an unrecognized mount option and the mount operation fails. If I omit the umask option, the ext4 stick works as expected but also as expected the fat32 stick is only writable by root.

Is there any way to make autofs work for both types of sticks?

Is it possible to use somehow an if condition to decide whether to mount it with umask or not?

I studied the mount man page to solve the problem and discovered the mount parameter -s (sloppy), but I don't know how to apply this for autofs and it did not even work with normal mount command and umask (mount -s -o umask=000 /dev/sdb1 /media/mymountpoint).

As expected: same problem with utf8 mount option.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.