Solved FUSE and py27-fs

hanzer

Member

Reaction score: 7
Messages: 97

PyFilesystem

1. Are there any tutorials on how to use FuseFS on FreeBSD?
2. Is the py27-fs package broken?

Setup:
freebsd-version -> 11.0-RELEASE-p1
sudo pkg install py27-fs
/boot/loader.conf
Code:
kern.geom.label.gptid.enable="0"
zfs_load="YES"
kern.vty=sc
fuse_load="YES"
/etc/sysctl.conf
Code:
hw.snd.default_unit=1
vfs.usermount=1
Example:
python2.7
Code:
from fs.osfs import OSFS
test_fs = OSFS('~/test')
test_fs.tree()
Code:
|-- 01.wav
|-- keyphrase.dic
|-- keyphrase.list
`-- wkp.log
Code:
from fs.memoryfs import MemoryFS
mem_fs = MemoryFS()
mem_fs.makedir('/foo/bar', recursive=True)
mem_fs.createfile('/foo/hello.txt', 'Hello, World!')
mem_fs.createfile('/foo/bar/bye.txt', 'So Long, World!')
mem_fs.tree()
Code:
`-- foo
    |-- bar
    |   `-- bye.txt
    `-- hello.txt
Code:
from fs.mountfs import MountFS
mount_fs = MountFS()
mount_fs.mountdir('test', test_fs)
mount_fs.mountdir('memory', mem_fs)
mount_fs.tree()
Code:
|-- memory
|   `-- foo
|       |-- bar
|       |   `-- bye.txt
|       `-- hello.txt
`-- test
    |-- 01.wav
    |-- keyphrase.dic
    |-- keyphrase.list
    `-- wkp.log
Code:
from fs.expose import fuse
fuse.mount(mount_fs, '/usr/home/hanzer/blah')
Code:
fuse: failed to open fuse device: Permission denied
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/fs/expose/fuse/__init__.py", line 464, in mount
    mp = MountProcess(fs, path, kwds)
  File "/usr/local/lib/python2.7/site-packages/fs/expose/fuse/__init__.py", line 581, in __init__
    raise RuntimeError("FUSE error: " + err_text)
RuntimeError: FUSE error: Mount unsuccessful
 
OP
OP
hanzer

hanzer

Member

Reaction score: 7
Messages: 97

UPDATE: I just tried this again and it worked. I suspect the problem was due to some problem in adding the hanzer user to the operator group... Sorry for the noise.
 
Top