come-maiz / ipfs-snap

IPFS packaged as a snap
MIT License
21 stars 6 forks source link

ipfs mount fails when installed via snap #6

Open come-maiz opened 7 years ago

come-maiz commented 7 years ago

Originally reported in https://github.com/ipfs/go-ipfs/issues/3788 by @mattseh

Version information:

root@snap:~# ipfs version --all go-ipfs version: 0.4.6- Repo version: 5 System version: amd64/linux Golang version: go1.7.5

Type: Bug

Priority: P3

Description:

On a fresh Ubuntu 16.04 VM, I installed go-ipfs:

root@snap:~# snap install ipfs
ipfs v0.4.6 from 'elopio' installed

With the daemon running, and /ipfs and /ipns created, I get this error:

root@snap:~# ipfs mount
Error: fusermount: exec: "fusermount": executable file not found in $PATH

This issue seems to suggest that it is because the snap doesn't depend on FUSE?

Thanks

come-maiz commented 7 years ago

Thanks for the report!

I haven't added support for mount on the snap yet, so it was an expected failure. In snaps you bundle all your dependencies, so installing fuse is simple, just add stage-packages: [fuse]. What might not be so simple is to give permission to the snap to mount. I need to give it a try, and if it's blocked by the strict confinement of the snap, talk to the security team to design a safe plug for this. I will have time for this during the weekend. Maybe it doesn't require any work at all, but I need to check.

come-maiz commented 7 years ago

I had some time to try it, and as I expected, the syscall is blocked by the confinement. I've reported a bug in snapd for them to add an interface that will allow fusermount: https://bugs.launchpad.net/snapd/+bug/1673191

abitrolly commented 6 years ago

@elopio is there any progress on this front?

come-maiz commented 6 years ago

@abitrolly nothing yet. The reported bug is still open. There's a workaround changing ipfs to run as root, but that would take a lot more work and testing than what I can do now. It would be nice if you or somebody else from the community give it a try :)

abitrolly commented 6 years ago

It is suggested that ipfs should include fusermount itself - https://forum.snapcraft.io/t/ipfs-needs-to-mount-ipfs-with-fuse-how/5080

bam80 commented 3 years ago

What is the current status, the same?