I used to use sshfs on SuSE. A very handy tool. Here is a HOW-TO on Ubuntu 7.10.
1. install the sshfs package.
sudo apt-get install sshfs
2. add user to the group of fuse to allow the user to mount sshfs file systems.
sudo usermod -a -G fuse $username
3. fix a bug
My Xbuntu os's /etc/mtab is a symbolic link to /proc/mounts, and I met an issue below.
Nabble - Bug#447621: libfuse2: fuse fails if /etc/mtab is a symlink to /proc/mounts
I did the following to fix the issue.
sudo cp /etc/mtab /etc/mtab.bak
sudo rm /etc/mtab
sudo mv /etc/mtab.bak /etc/mtab
4. Now you can try "sshfs $user@remotehost:$location $mountpoint".
5. To mount sshfs easier, you can put an entry in /etc/fstab.
sshfs#user@$remotehost:[$path] $mountpoint fuse user,noauto 0 0
If you want other users to be able to access the directory, you can specify
user_allow_other in /etc/fuse.conf. And then put the option of allow_other or
allow_root into /etc/fstab.
If you want to be able to execute a program in the sshfs mounted, you can specify the mount option of exec in the entry in /etc/fstab.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment