Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

http://pastie.org/1969299

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

share|improve this question
    
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 Thompson May 25 '11 at 20:43
add comment

3 Answers

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
share|improve this answer
add comment

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.

share|improve this answer
    
local I am jm server I have both jm and something else –  JM at Work May 26 '11 at 2:56
add comment

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

share|improve this answer
    
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 Thompson May 31 '11 at 2:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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