r/freebsd•
phantom94

Missing /dev/fuse in (ez)jail

Hi Guys,

I have an FreeBSD droplet on DigitalOcean. On my droplet I have several jails (created with ezjail) to run some services. In one of my jails I want to mount a sshfs volume to save some space on my droplet and have it on a local disk. I installed both sshfs and fuse-sshfs.

My problem is when I am mounting a folder from my remote machine:

sshfs user@ip:/folder/subfolder ./mount-point

it returns

fuse: failed to open fuse device: No such file or directory

So basically, /dev/fuse cannot be found.

If I try it on the host, it works fine and /dev/fuse can be found.

How can I solve this?

Thanks in advance!

Posted Aug 12, 2015, 10:23 AM UTC

33
Ikinoki•

So you have to modify devd rules for this to work. Remember that you can always mknod /dev/fuse inside jail from within the host. But better way is to setup devd rules accordingly.

1
phantom94OP•

How do I need to modify the devd rules to make it work though?

Also if I try the mknod method and mount the sshfs machine it returns:

mount_fusefs: /dev/fuse on /root/test: Operation not permitted
fuse: failed to mount file system: No such file or directory
1
Ikinoki•

Look into sysctl security.jail

Plus there is a whole new devfs system which will allow unmasking needed node for your fuse usage

try this

man devfs

to see all rules in rulesets

sh -c 'for i in `devfs rule showsets` ; do echo $i;devfs rule -s $i show ; done'
1