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.

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.