sshfs adalah filesystem client untuk mounting direktory dan file di mesin remote. Implementasi sshfs menggunakan fuse.
Secara default user lain tidak bisa membaca dan menulis di direktory yang dimount. Namun kita bisa mengubahnya dengan beberapa langkah. Berikut langkah-langkah dalam ubuntu 10.10, dalam distro lain silahkan disesuaikan.
Pertama, pastikan user tersebut, yang melakukan mounting sshfs, tergabung dengan group fuse.
$ sudo usermod -a -G fuse komaruloh
Supaya efek penambahan group berlaku maka lakukan logout dan login ulang.
Kedua, edit file /etc/fuse.conf
$ sudo vim /etc/fuse.conf
# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000# Allow non-root users to specify the ‘allow_other’ or ‘allow_root’
# mount options.
#
#user_allow_other
Buang komentar pada baris terakhir.
# Allow non-root users to specify the ‘allow_other’ or ‘allow_root’
# mount options.
#
user_allow_other
Simpan file yang telah dirubah.
Ketiga, lakukan monting remote file/direktori menggunakan sshfs.
sshfs -o allow_other otheruser@remotehost.com:/home/otheruser/mydirectory/ /home/komaruloh/mydirectory
otheruser@remotehost.com’s password:
Perhatikan option “-o allow_other” yang membuat user lain bisa mendapatkan akses baca/tulis ke file/direktory reomte yang di mouting. Bila langkah kedua tidak kita lakukan maka kita akan mendapatkan error seperti ini :
otheruser@remotehost.com’s password:
fusermount: failed to open /etc/fuse.conf: Permission denied
fusermount: option allow_other only allowed if ‘user_allow_other’ is set in /etc/fuse.conf
Kaitkata: fuse, read/write in sshfs, sshfs