3

I am trying to distribute a FUSE filesystem implementation as a snap package, but I can't get it working. Mounting fails silently, even when the snap is installed with the --devmode option.

Any help in solving this would be greatly appreciated!

Steps to reproduce for sshfs:

contents of snapcraft.yaml:

name: sshfs
version: 1
summary: Mount a remote filesystem over ssh
description: Mount a remote filesystem over ssh
confinement: devmode 

apps:
    sshfs: 
        command: usr/bin/sshfs
        plugs:
            - home
            - network
            - mount-observe
parts:
    env:
        plugin: nil
        stage-packages:
            - sshfs

attempt to get it working:

x@VirtualBox:~/snaps/sshfs$ snapcraft prime
...
x@VirtualBox:~/snaps/sshfs$ cd prime/bin
x@VirtualBox:~/snaps/sshfs/prime/bin$ sudo chown root:root fusermount
[sudo] password for x: 
x@VirtualBox:~/snaps/sshfs/prime/bin$ sudo chmod +s fusermount 
x@VirtualBox:~/snaps/sshfs/prime/bin$ cd ../..
x@VirtualBox:~/snaps/sshfs$ snapcraft
...
x@VirtualBox:~/snaps/sshfs$ ls
parts  prime  snapcraft.yaml  sshfs_1_amd64.snap  stage
x@VirtualBox:~/snaps/sshfs$ sudo snap install sshfs_1_amd64.snap --devmode
64.75 MB / 64.75 MB [======================================] 100.00 % 5.83 MB/s 

Name   Version  Rev  Developer  Notes
sshfs  1        x1              devmode
x@VirtualBox:~/Downloads$ cd ~
x@VirtualBox:~$ mkdir mountpnt
x@VirtualBox:~$ which sshfs
/snap/bin/sshfs
x@VirtualBox:~$ sshfs <some remote>: mountpnt
x@VirtualBox:~$ ls mountpnt
# Nothing here!
x@VirtualBox:~$ mount
...
/var/lib/snapd/snaps/ubuntu-core_122.snap on /snap/ubuntu-core/122 type squashfs (ro,relatime)
/var/lib/snapd/snaps/sshfs_x1.snap on /snap/sshfs/x1 type squashfs (ro,relatime)
# Remote is not mounted!
2

0

You must log in to answer this question.

Browse other questions tagged .