Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using sshfs to mount a folder with some python projects over ssh to my ~/ directory.

$ mkdir -p ~/mount/myprojects
$ sshfs user@myserver:/home/user/myprojects ~/mount/myprojects

I can perform most commands as could be expected:

$ ls ~/mount/myprojects
somepythonproject

But I if I try to do anything with sudo, it fails with permission denied:

$ sudo ls ~/mount/myprojects
ls: cannot access /home/user/mount/myprojects: Permission denied

What I'm actually trying to accomplish is to test a python package installation script on my local machine:

$ cd ~/mount/myprojects/somepythonproject
$ sudo python setup.py install

Any help would be appreciated. BTW, I am running Xubuntu 12.10.

share|improve this question

1 Answer 1

up vote 15 down vote accepted

I believe you need use the allow_other option to sshfs. In order to do this, you should call it with sudo, as follows:-

sudo sshfs -o allow_other user@myserver:/home/user/myprojects ~/mount/myprojects

Without this option, only the user who ran sshfs can access the mount. This is a fuse restriction. More info is available by typing man fuse.

You should also note that (on Ubuntu at least) you need to be a member of the 'fuse' group, otherwise the command above will complain about not being able to access etc/fuse.conf when ran without 'sudo'.

share|improve this answer
    
Good first answer! –  slm Dec 28 '12 at 15:31
3  
See also the allow_root option to allow root only. Please note however that those options are restricted to root by default unless you add a user_allow_other line to /etc/fuse.conf. –  Stéphane Chazelas Dec 28 '12 at 15:55
    
Helped me out of a jam, thank you for this! –  Oldskool Jun 25 at 14:30

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.