An important detail, about how to use ‘fusermount’, which I only learned recently.

It’s old wisdom under Linux, that system administrators do not allow just any user to mount file-systems. The reason is the fact that, with any sophisticated file-system, each file can have ‘root’ ownership, as well as having the ‘setuid’ flag set, which means that if a malicious user was next to execute a program with those bits set, he would have given himself root privileges.

The fact that with most Linux desktop managers, auto-mounting is handled in the background, by a daemon, only serves to verify this concern.

But ways exist to mount a file-system, so that all the files and directories within it, just arbitrarily have one current user as their owner. Only a regular user with access to the ‘mount’ command, cannot be trusted to use such options.

BUT, There exists a utility on modern Linux systems – if it’s installed – which is called ‘fusermount’. This is a command, for mounting file-systems in user-space. Its main purpose is, to give regular users the ability to mount a file-system, but only to have its files and directories belong to them – safely.

In the past, I had a hard time using this command, because every time I tried, I just got the error-message that I did not have permissions to do so, as a regular user. What I did at first, was to use ‘visudo’, in order to give myself the privilege to use ‘mount’ with ‘sudo’.

But as it turns out, there is a detail to using ‘fusermount’ properly, which I only learned about recently.

Continue reading An important detail, about how to use ‘fusermount’, which I only learned recently.