Ubuntu: mounting remote using sshfs



Question:

I'm trying to mount a remote server to edit some project i used to do that on windows using winscp. Now I'm using xubuntu and trying to mount a remote filesystem to my pc.

I'm using this command to do the things:

#useradd root fuse    #sshfs -o idmap=user,IdentityFile=/home/username/my_ssh_key user@www.remote-host.com:/ /mountpoint  

Things work as i expected, the remote file system get mounted on my pc, but I'm unable to edit and save a file in that remote directory, I got permission denied error when saving the file that i edited.

Does anyone know the workaround to this problem, please help me.


Solution:1

sshfs uses fuse for permissions.

  1. Add/Uncomment user_allow_other to /etc/fuse.conf
  2. Add your user to the fuse group.
    • useradd -G fuse $USER
    • reboot
  3. As your normal user, mount it

You should be able to mount/unmount with your normal user. In some cases, you may have to umount as root, if the filesystem gets messed up, or you lose the link in a weird way.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »