I just created a folder according to SSHFS (Ubuntu Docs)

sudo apt-get install sshfs
sudo gpasswd -a jm fuse
sshfs -o idmap=user jm@example.com:/path/to/folder folder

Then I found that the folder is mounted, but I cannot write to it. The permissions seems fine


But I even tried with

chmod -R 777 ./folder

Still no go

UPDATE: It seems I can't write using NetBeans only. But it works with LeafPad for example

  • It would help if you posted a short transcript showing how you tried to write to the sshfs filesystem, along with the resulting error. – Ryan C. Thompson May 25 '11 at 20:43

Your update indicates that only certain applications are having trouble writing to the sshfs mount. You might have to enable one or more of the "workarounds" listed in the sshfs man page. I would start with the "truncate" and "rename" workarounds:

sshfs -o idmap=user -o workaround=truncate:rename jm@example.com:/path/to/folder folder

It is not clear from your description what are the local and remote user, and what are the permissions of the files.

In any case, I would try to use the option -o allow_other on the sshfs command line.

  • local I am jm server I have both jm and something else – JM at Work May 26 '11 at 2:56

You need to install FUSE and add yourself to the group.

sudo apt-get install fuse-utils
sudo modprobe fuse
sudo gpasswd -a $USER fuse

Restart your machine and attempt to mount the drive again.

I would recommend that you add a rule to your /etc/fstab file, much like this:

sshfs#user@host.com:/ /mnt/local-dir/ fuse comment=sshfs,noauto,users,exec,uid=1000,gid=1000,allow_other,reconnect,transform_symlinks,BatchMode=yes,IdentityFile=/home/user/.ssh/id_rsa-blahblah 0 0

Then you can run mount /mnt/local-dir to mount the remote filesystem.

If you are unfamiliar with public-key authentication, remove the ',IdentityFile=/home/user/.ssh/id_rsa-blahblah' and go look into public-key authentication :D

  • sshfs depends on fuse-utils and cannot work without. The user already has it, so your suggestion cannot solve the problem. – enzotib May 25 '11 at 20:38
  • The problem is that he does not have FUSE configured correctly. At one time, it was required to install FUSE. I have updated the answer to be more helpful. I am very confident that FUSE is indeed his problem. – earthmeLon May 25 '11 at 21:24
  • In my experience, you cannot mount a FUSE filesystem at all unless FUSE is already configured. The fact that the OP has successfully mounted the filesystem indicates that this has been done already. The information on fstab and public-key auth, while useful, is not relevant to solving the OP's problem. – Ryan C. Thompson May 31 '11 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.