| Unix Content | Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| I can ssh to a machine as a non-root user and run the "ls" command. I can sshfs to the same machine as a non-root user but "ls" fail with "Permission denied". Please help to fix this problem. twong@local$ sudo sshfs -o idmap=user remote: /home/twong/remote root@remote's password: ;sshfs successfully. twong@local$ ls -l /home/twong/remote ls: /home/twong/remote: Permission denied root@local#ls -l /home/twong/remote ;... files in the /root directory of remote can be listed correctly by root at local. twong@local$ sudo sshfs -o idmap=user remote:/home/twong /home/twong/ remote root@remote's password: twong@local$ ls -l /home/twong/remote ls: /home/twong/remote: Permission denied root@local#ls -l /home/twong/remote ;... drwxrwxr-x 1 505 505 4096 Apr 24 17:39 bin files in the /home/twong directory of remote can be listed by root at local but the id is not twong. local machine OS is FC6. remote OS is RH7.2. |
|
#2
|
| On Aug 13, 10:14*am, TsanChung > I can ssh to a machine as a non-root user and run the "ls" command. > I can sshfs to the same machine as a non-root user but "ls" fail with > "Permission denied". > Please help to fix this problem. > > twong@local$ sudo sshfs -o idmap=user remote: /home/twong/remote > root@remote's password: > ;sshfs successfully. > > twong@local$ ls -l /home/twong/remote > ls: /home/twong/remote: Permission denied > > root@local#ls -l /home/twong/remote > ;... > files in the /root directory of remote can be listed correctly by root > at local. > > twong@local$ sudo sshfs -o idmap=user remote:/home/twong /home/twong/ > remote > root@remote's password: > twong@local$ ls -l /home/twong/remote > ls: /home/twong/remote: Permission denied > > root@local#ls -l /home/twong/remote > ;... > drwxrwxr-x 1 505 505 * * 4096 Apr 24 17:39 bin > files in the /home/twong directory of remote can be listed by root at > local but the id is not twong. > > local machine OS is FC6. > remote OS is RH7.2. Problem is solved as follows. twong@local$ id twong uid=500(twong) gid=500(twong) groups=500(twong),101(fuse) twong@local$ sudo sshfs -o idmap=user -o uid=500 -o gid=500 -o allow_other twong@thorin: /home/twong/thorin |
|
#3
|
| TsanChung > twong@local$ sudo sshfs -o idmap=user -o uid=500 -o gid=500 -o > allow_other twong@thorin: /home/twong/thorin Why were you running sshfs within sudo in the first place? Assuming this is the FUSE-based sshfs and not some other sshfs, the intended usage is that you run it as the ordinary user, and it calls the setuid fusermount program to mount the filesystem. -- Simon Tatham "The distinction between the enlightened and the |
|
#4
|
| On Aug 15, 11:13*am, Simon Tatham > TsanChung * > > twong@local$ sudo sshfs -o idmap=user -o uid=500 -o gid=500 -o > > allow_other twong@thorin: /home/twong/thorin > > Why were you running sshfs within sudo in the first place? Assuming > this is the FUSE-based sshfs and not some other sshfs, the intended > usage is that you run it as the ordinary user, and it calls the > setuid fusermount program to mount the filesystem. > -- > Simon Tatham * * * * "The distinction between the enlightened andthe > If I do not use sudo, then it will fail. $ sshfs -o idmap=user -o uid=500 -o gid=500 -o allow_other twong@remote: /home/twong/remote twong@remote's password: fuse: failed to exec fusermount: Permission denied $ sshfs -V SSHFS version 1.7 FUSE library version: 2.6.3 using FUSE kernel interface version 7.8 |
|
#5
|
| TsanChung > If I do not use sudo, then it will fail. [...] > fuse: failed to exec fusermount: Permission denied So check the permissions on fusermount. But fixing that problem is the _right_ answer; any trickery with sudo is a workaround at best. -- Simon Tatham "What a caterpillar calls the end of the |
|
#6
|
| On Aug 15, 1:53*pm, Simon Tatham > TsanChung * > > If I do not use sudo, then it will fail. > [...] > > fuse: failed to exec fusermount: Permission denied > > So check the permissions on fusermount. But fixing that problem is > the _right_ answer; any trickery with sudo is a workaround at best. > -- > Simon Tatham * * * * "What a caterpillar calls the end of the > You are right. I do not need sudo. I need to logout completely in order that sshfs will work properly. |
|
#7
|
| On Aug 15, 1:53*pm, Simon Tatham > TsanChung * > > If I do not use sudo, then it will fail. > [...] > > fuse: failed to exec fusermount: Permission denied > > So check the permissions on fusermount. But fixing that problem is > the _right_ answer; any trickery with sudo is a workaround at best. > -- > Simon Tatham * * * * "What a caterpillar calls the end of the > You are right. I do not need sudo. I need to logout completely in order that sshfs will work properly. |