Skip to content

"allow_other" fuse options -- which is set by default -- do not allow to mount filesystem as ordinary user on FreeBSD #216

@taras-filatov

Description

@taras-filatov

I'ts a proposition to change the defaults.

On FreeBSD (now 15.0) I expect to be able to mount filesystems via fuse as ordinary user. For example,
fuse-ufs
and
simple-mtpfs
expose this option to user.

mkfs.exfat-fuse - not. So I obliged to run it as superuser, or get an error:

taras@bsd15:~% mount.exfat-fuse /dev/gpt/common ~/mnt_common/
FUSE exfat 1.4.0 (libfuse2)
taras@bsd15:~% mount_fusefs: /dev/fuse on /home/taras/mnt_common: Operation not permitted (extended error FUSE daemon requires privileges due to 'allow_other' option)

I propose a patch to change this behavior to expected -- remove default fuse option allow_other, but recognize it, if given in '-o' list.
In this form it works for me as port patch.

--- fuse/main.c.orig    2023-03-02 19:49:24 UTC
+++ fuse/main.c
@@ -577,6 +577,7 @@ static char* add_passthrough_fuse_options(char* fuse_o
 {
        const char* passthrough_list[] =
        {
+               "allow_other",
 #if defined(__FreeBSD__)
                "automounted",
 #endif
@@ -614,7 +615,7 @@ int main(int argc, char* argv[])
 
        printf("FUSE exfat %s (libfuse%d)\n", VERSION, FUSE_USE_VERSION / 10);
 
-       fuse_options = strdup("allow_other,"
+       fuse_options = strdup(
 #if FUSE_USE_VERSION < 30 && (defined(__linux__) || defined(__FreeBSD__))
                        "big_writes,"
 #endif

patch-fuse_main.c

====
Or maybe it better to add another option, like in ntfs-3g: no_def_opts, thus it will no break existing configs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions