How to mount a fuse-sshfs file system inside a FreeBSD-12.0p10 jail


I wish to mount a remote data source locally as a fuse file system. This is listed as supported by lsvfs:

Filesystem                              Num  Refs  Flags
-------------------------------- ---------- -----  ---------------
devfs                            0x00000071     4  synthetic, jail
cd9660                           0x000000bd     0  read-only
procfs                           0x00000002     4  synthetic, jail
nfs                              0x0000003a     0  network
zfs                              0x000000de    17  jail, delegated-administration
msdosfs                          0x00000032     0  
ufs                              0x00000035     0  
fdescfs                          0x00000059     4  synthetic, jail
fusefs                           0x000000ed     0  synthetic, jail
nullfs                           0x00000029     3  loopback, jail
tmpfs                            0x00000087     0  jail

I have installed fusefs-sshfs in the jail. I have also created the mount point directory.

In the host's/etc/sysctl.conf I have security.jail.enforce_statfs=1; and in /etc/rc.conf I have kld_list="fuse" (which I believe is redundant but is there nonetheless).

In the (ez)jail configuration I allow allow.mount, allow.mount.nullfs, and allow.mount.fusefs.

Inside the jail I can establish an sftp link to the remote data source and change directory to OUT:

sftp -o IdentityFile=/var/data/theheart/.ssh/xxx_rsa_id
Connected to
sftp> dir
OUT  bin  dev  etc  lib  usr

But I cannot mount that data source as a fuse ssh file system:

/usr/local/bin/sshfs -C -o uid=16701 -o gid=16701     -o reconnect -o IdentityFile=/var/data/theheart/.ssh/xxx_rsa_id /var/spool/xxx/pick_up
mount_fusefs: /dev/fuse on /var/spool/xxx/pick_up: Operation not permitted
fuse: failed to mount file system: No error: 0

Is this possible? The Jail(8) manpage implies that it is given the presence of the allow.mount.fusefs setting. If so then what step(s) am I missing?

asked on Server Fault Sep 16, 2019 by James B. Byrne

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0