Failed to mount FUSE fs : FreeBSD


#1

Hi,

I’m trying to mount a O365 OneDrive using a non-root user on FreeBSD 12 RC1. I can do this successfully with the following command:
rclone mount --dir-cache-time 5s --vfs-cache-mode full onedrive: /tank/onedrive

However, if I try with “–allow-other” (full command below):
rclone mount --allow-other --dir-cache-time 5s --vfs-cache-mode full onedrive: /tank/onedrive

I get these errors:
mount helper error: mount_fusefs: /dev/fuse on /tank/onedrive: Operation not permitted
Fatal error: failed to mount FUSE fs: mount_fusefs: exit status 71

Does anyone know what might be causing this or how to fix it? As far as I can tell, on FreeBSD, FUSE doesn’t use /etc/fuse.conf file to add the “allow_other” setting - that I know of.

Thanks!

Doubleddav


#2

That is what I was going to suggest :frowning: Did you try it?

Hmm…

It could be a bug in the underlying library: https://github.com/bazil/fuse

Not really sure… Are there any kernel messages?


#3

In the end, I did add “allow_other” - I found that FreeBSD does use \etc\fuse.conf after all. Unfortunately it didn’t make a difference.

There are no kernel messages. I have also tested this on FreeBSD 11.2, just in case it was a bug in version 12 RC1 - but I got the same error.

Is there anything else you can suggest? I can run a trace if that’s helpful, if it helps you debug. I wonder if anyone else might be seeing this as well?

Thanks


#4

I suspect this is a bug in the upstream library: https://github.com/bazil/fuse

I had a quick trace through the code and all it seems to be doing is adding the allow_other as an option.

What I’d do if I were you is try to reproduce the problem with the upstream library directly, using one of the examples and if you can report an issue there. So for example try hellofs but add the extra option fuse.AllowOther() in the call to fuse.Mount.


#5

Using the helloworld example, I was able to successfully compile and “mount” the example as expected.

By adding fuse.AllowOther(), compiling and running again I got exactly the same error as mentioned previously:
mount helper error: mount_fusefs: /dev/fuse on /tank/onedrive: Operation not permitted Fatal error: failed to mount FUSE fs: mount_fusefs: exit status 71

Below is a snippet from hello.go that I edited, just want to confirm the changes I made are what you were suggesting:

func main() {
        flag.Usage = usage
        flag.Parse()

        if flag.NArg() != 1 {
                usage()
                os.Exit(2)
        }
        mountpoint := flag.Arg(0)

        c, err := fuse.Mount(
                mountpoint,
                fuse.FSName("helloworld"),
                fuse.Subtype("hellofs"),
                fuse.LocalVolume(),
                fuse.VolumeName("Hello world!"),
                fuse.AllowOther(),
        )

#6

Well done :slight_smile: That shows quite nicely that it is a problem with the library

You just added the one fuse.AllowOther() line? That looks correct.

In your bug report, I’d present that as a diff.

If you make a bug report then it would probably be a good idea to make a matching rclone issue on github and link the two together.


#7

Thanks for that, done!

Bug logged here: https://github.com/bazil/fuse/issues/206
and here: https://github.com/ncw/rclone/issues/2828
I’ll fill out some of the missing details shortly


#8

Super - well done!

If you were feeling adventurous you could try to find the problem in the bazil library and submit a pull request.