#8254: bfs_fuse needs root privs since hrev41258 --------------------------------+---------------------------- Reporter: luroh | Owner: axeld Type: bug | Status: new Priority: normal | Milestone: R1 Component: File Systems/BFS | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All --------------------------------+---------------------------- Comment (by idefix): I tried to mount an partition in Linux (Ubuntu 11.10) as a normal user, but it wouldn't let me:[[BR]] With hrev41257: {{{ jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ mkdir bfs_fuse_mount jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ ./bfs_fuse_hrev41257 /dev/sda7 bfs_fuse_mount/ bfs: Mount:329: Bad file descriptor bfs: bfs_mount:172: Bad file descriptor Error: Mounting FS failed: Bad file descriptor jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ sudo ./bfs_fuse_hrev41257 /dev/sda7 bfs_fuse_mount/ [sudo] password for jeroen: bfs: mounted "Build" (root node at 524288, device = /dev/sda7) jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ umount bfs_fuse_mount umount: /home/jeroen/Builds/Haiku/befs_fuse_bug/bfs_fuse_mount is not in the fstab (and you are not root) jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ sudo umount bfs_fuse_mount jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ }}} With hrev43876: {{{ jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ mkdir bfs_fuse_mount jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ ./bfs_fuse_hrev43876 /dev/sda7 bfs_fuse_mount bfs: Mount:340: Bad file descriptor bfs: bfs_mount:172: Bad file descriptor Error: Mounting FS failed: Bad file descriptor jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ sudo ./bfs_fuse_hrev43876 /dev/sda7 bfs_fuse_mount [sudo] password for jeroen: bfs: mounted "Build" (root node at 524288, device = /dev/sda7) jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ umount bfs_fuse_mount umount: /home/jeroen/Builds/Haiku/befs_fuse_bug/bfs_fuse_mount is not in the fstab (and you are not root) jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ sudo umount bfs_fuse_mount jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ }}} When mounting an image, it would let me do it as non-user though.[[BR]] With hrev41257: {{{ jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ mkdir bfs_fuse_mount jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ ./bfs_fuse_hrev41257 haiku- nightly.image bfs_fuse_mount bfs: mounted "Haiku" (root node at 131072, device = haiku-nightly.image) jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ umount bfs_fuse_mount umount: /home/jeroen/Builds/Haiku/befs_fuse_bug/bfs_fuse_mount is not in the fstab (and you are not root) jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ sudo umount bfs_fuse_mount [sudo] password for jeroen: jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ }}} But not with hrev43876: {{{ jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ mkdir bfs_fuse_mount jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ ./bfs_fuse_hrev43876 haiku- nightly.image bfs_fuse_mount bfs: mounted "Haiku" (root node at 131072, device = haiku-nightly.image) fusermount: failed to open /etc/fuse.conf: Permission denied fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf jeroen@Gromit:~/Builds/Haiku/befs_fuse_bug$ }}} This is caused by the fuse option `allow_other`, which is - by default - not allowed when mounting as non-root user. I created [attachment:0001-Allow-non-root-to-mount-BFS-partition-with- bfs_fuse.patch a patch] that will only set this option when the user is root. -- Ticket URL: <http://dev.haiku-os.org/ticket/8254#comment:2> Haiku <http://dev.haiku-os.org> Haiku - the operating system.