SSHFS
The idea of sshfs was taken from the SSHFS filesystem distributed with LUFS, which I found very useful. There were some limitations of that codebase, so I rewrote it. Features of this implementation are: * Based on FUSE (the best userspace filesystem framework for linux ;-) * Multithreading: more than one request can be on it's way to the server * Allowing large reads (max 64k) * Caching directory contents This install will explain how to install and mount sshfs. It will give examples of how to mount on boot using the /etc/fstab
Applicable to Fedora Versions
- Fedora Core 7+
Requirements
- You must have Fedora Extra's as a repository
- You must have a ssh server to test this on
Doing the Work
- You will need to install sshfs:
- The user needs to be added to group fuse:
- How to mount it (Remeber to change it to your specific settings):
- To unmount:
su -c 'yum install fuse-sshfs'
su -c 'gpasswd -a yourusername fuse'
sshfs yourusername@yourdomain.com: yourmountpoint/
fusermount -u yourmountpoint/
The next bits are your choice and are not required for SSHFS to function
- We will set it up so that it automatically mounts on boot using fstab:
- You will need to add this line:
su -c 'gedit /etc/fstab'
sshfs#myname@www.myhome.com:/home/myname /mnt/sshfs/homebox fuse comment=sshfs,noauto,users,exec,uid=1000,gid=1000,allow_other,reconnect,transform_symlinks,BatchMode=yes
Troubleshooting
How to test
- If you get a fusermount denied error you may need to set sshfs to SUID:
- You may get issues with SELinux you can either disable it or set it to permissive:
su -c 'chmod u+s /usr/bin/sshfs'
su -c 'gedit /etc/selinux/config'Then Change it to the following:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
Common problems and fixes
More Information
Disclaimer
We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net

