Fuse

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


There are a few example scripts.  You can find them in the examples/
subdirectory.  These are:

* example.pl, a simple "Hello world" type of script

* loopback.pl, a filesystem loopback-device.  like fusexmp from
               the main FUSE dist, it simply recurses file operations
               into the real filesystem.  Unlike fusexmp, it only
               re-shares files under the /tmp/test directory.

* rmount.pl, an NFS-workalike which tunnels through SSH.  It requires
             an account on some ssh server (obviously), with public-key
             authentication enabled.  (if you have to type in a password,
             you don't have this.  man ssh_keygen.).  Copy rmount_remote.pl
             to your home directory on the remote machine, and create a
             subdir somewhere, and then run it like:
             ./rmount.pl host /remote/dir /local/dir

* rmount_remote.pl, a ripoff of loopback.pl meant to be used as a backend
                    for rmount.pl.


BUGS

At time of writing, Perl (5.8.7) did not support shared subroutine references.
Symptoms include a cryptic error message like "Invalid value for shared scalar"
from Fuse.pm.  Until this is fixed, if you use threaded mode, you need to use
symbolic references (i.e. passing "main::cb" instead of \&cb).  This doesn't
allow things like closures, lexical subs and that sort of thing, but it does
work for me.

Currently tests have been attempted and succeeded on:
  * Ubuntu 13.04/amd64
  * Fedora 19/amd64
  * CentOS 6.4/amd64
  * CentOS 5.9/amd64
  * CentOS 5.9/i386
  * OpenSuSE 12.3/amd64
  * Debian 7.1/powerpc
  * Slackware 13.1/amd64
  * NetBSD 6.1.1/amd64
  * FreeBSD 9.1/amd64
  * MacOS X 10.6.8 [OSXFUSE 2.6.1]
  * MacOS X 10.7.5 [OSXFUSE 2.6.1]


NOTES FOR BSD USERS

On NetBSD, there is a potential issue with readdir() only being called
once when using librefuse. However, currently using Perfuse causes other
issues (readlink() drops the last character from the read link path, and
the block count in stat() is incorrect). We will be addressing these
concerns with the appropriate developers in the near future.

If you are using Perfuse on NetBSD, you should do the following (as root):

cat >> /etc/sysctl.conf <<_EOT_
kern.sbmax=2621440
net.inet.tcp.sendbuf_max=2621440
net.inet6.tcp6.sendbuf_max=2621440
_EOT_
sysctl -f /etc/sysctl.conf

Perfuse uses TCP sockets, and needs large send buffers.

On NetBSD and FreeBSD, extended attributes do not work. These are
specifically related to the FUSE implementations on those platforms.

Normally you can not mount FUSE filesystems as non-root users on FreeBSD
and NetBSD. They can allow non-root users to mount FUSE filesystems, but
instead of changing the mode of /dev/fuse or /bin/fusermount, you need
to use sysctl to allow user mounts. For FreeBSD, this involves (as root):

sysctl -w vfs.usermount=1
pw usermod <your username here> -G operator

And on NetBSD (also as root):

sysctl -w vfs.generic.usermount=1
chmod 0660 /dev/putter
usermod -G wheel <your username here>


NOTES FOR OPENBSD IN PARTICULAR

Oh, hello. You're an OpenBSD user. You like your secure, minimalist OS, but
you really want in on that FUSE-y goodness. Well, it's still pretty early
and kind of broken, but yes, FUSE has actually made its way onto OpenBSD.

That said, it's not (as of this writing) in a released version. It *has*
made its way into OpenBSD's CVS HEAD, but unless you're feeling very
brave, you may not want to take that leap. You should, however, read this
mailing list thread:

http://marc.info/?t=136248759400010&r=1&w=4

Even after patching with the latest userspace and kernel code patches,
I still needed to add the following to src/sys/miscfs/fuse/fuse_vfsops.c,
as line 23:

#include <sys/filedesc.h>

For me, it wouldn't build otherwise. You should be familiar with building
a kernel, and your entire userspace; if not, read the OpenBSD FAQ.

Once you've built your kernel, installed it, and built and installed your
new userspace, reboot. You may also need to copy /usr/src/lib/libfuse/fuse.h
to /usr/include/fuse.h. (I did.) Also, for the tests, I recommend installing
devel/p5-Lchown, and installing Filesys::Statvfs, Unix::Mknod and Test::Pod
out of CPAN.

Okay, once you've done all that, run (as root):

cd /dev
./MAKEDEV fuse

If that doesn't work, do this (also as root):

cd /usr/src/etc
make



( run in 1.348 second using v1.01-cache-2.11-cpan-39bf76dae61 )