sshfs Redux

November 13, 2003

A couple people have asked about sshfs (one of the filesystems included with LUFS. Well, here's how I've got things set up:

The following command installs LUFS in Debian:

# install requisite packages
apt-get install lufs-source lufs-utils module-assistant debhelper
# compile and install kernel module
module-assistant auto-install lufs
# load module
/sbin/modprobe lufs
# set lufs mount SUID
chmod a+s `which lufsmnt`

Here's the /etc/fstab entry for our sample filesystem:

none /mnt/snow-www lufs fs=sshfs,rw,user,nosuid,host=www,username=pabs,noauto 0 0

sshfs uses your existing ~/.ssh/config settings. In this case, we're concerned about the proxycommand stuff:

Host www
  proxycommand ssh -A phoenix.snowman.net nc -q 10 %h ssh

The last thing to do is create the mount directory, and make sure the ownership is correct:

# create directory & fix ownership
mkdir /mnt/snow-www && chown pabs:pabs /mnt/snow-www

And that should be it. Caveats: lufsumount seems to be a little picky, your LUFS mounts won't show up in df, and sshfs doesn't do any client-side caching, so things are a wee bit slow.