fuse: failed to open /dev/fuse: Permission denied

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1484
Joined: Fri Aug 29, 2003 8:39 pm

fuse: failed to open /dev/fuse: Permission denied

Post by ^rooker »

[PROBLEM]
During beta-testing of Ubuntu Hardy, I ran into some problems with wrong permissions when trying to mount e.g. USB harddisks or my CD-ROM drive.

When trying to mount an NTFS partition using ntfs-3g, I suddenly received the following error:
fuse: failed to open /dev/fuse: Permission denied

[SOLUTION]
The device /dev/fuse is only accessible by "root" and users of the group "fuse". Here's the output of "ls -la /dev/fuse"
crw-rw---- 1 root fuse 10, 229 2008-02-01 18:08 /dev/fuse
Now I saw that my user was not in the group "fuse" at all, so I just added it. You can take a look at this Linux Howto: Add a user to a group".

In the shell it's as easy as:

Code: Select all

sudo usermod -a -G groupname username
You would have to logout/login (e.g. end gnome/kde session) in order for the group changes to apply, but you can also do:

Code: Select all

newgrp fuse
to avoid the unnecessary re-login. Verify if you are really in the group fuse by calling the command "groups".
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1484
Joined: Fri Aug 29, 2003 8:39 pm

fusermount: option allow_other only allowed if ...

Post by ^rooker »

[PROBLEM]
There's another error that you might run into when trying to mount a fuse-based device:
fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
Even if you enable "user_allow_other" in /etc/fuse.conf you still can't mount the drive, and will probably run into this error:
fusermount: option blkdev is privileged

[SOLUTION]
The "ntfs-3g" executable should have the setuid root flag set, but in my case it didn't (Ubuntu Hardy).
These 2 commands will change the ownership to "root" and enable the setuid flag:

Code: Select all

sudo chown root $(which ntfs-3g)
sudo chmod 4755 $(which ntfs-3g)
So, my old (broken) rights for /bin/ntfs-3g looked like this (ls -la /bin/ntfs-3g):
-rwxr-xr-x 1 root root 36940 2008-01-12 06:40 /bin/ntfs-3g
After correcting the rights, it had "-rws" instead of "-rwx":
-rwsr-xr-x 1 root root 36940 2008-01-12 06:40 /bin/ntfs-3g
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1484
Joined: Fri Aug 29, 2003 8:39 pm

Another error I ran into.

Post by ^rooker »

Mount is denied because setuid and setgid root ntfs-3g is insecure with the
external FUSE library. Either remove the setuid/setgid bit from the binary
or rebuild NTFS-3G with integrated FUSE support and make it setuid root.
Please see more information at http://ntfs-3g.org/support.html#unprivileged
Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://ntfs-3g.org/support.html#unprivileged
Post Reply