Networking Forums

Networking Forums > Computer Networking > Linux Networking > sshfs to a machine ok but ls fail with Permission denied

Reply
Thread Tools Display Modes

sshfs to a machine ok but ls fail with Permission denied

 
 
TsanChung
Guest
Posts: n/a

 
      08-14-2008, 03:04 PM
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.

The local machine OS is FC6.
The same problem appear in two remote machines.
The first remote OS is RH7.2.
The second remote OS is HP-UX B.11.31 U ia64.
 
Reply With Quote
 
 
 
 
TsanChung
Guest
Posts: n/a

 
      08-15-2008, 01:31 PM
On Aug 14, 3:01*pm, Maxwell Lol <nos...@com.invalid> wrote:
> TsanChung <tsanchung.w...@gmail.com> writes:
> > 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.

>
> I don't know what sshfs is, but use the id command to check what your UIDand GID are.
>
> Check the FAQ. It says something about *the options
>
> * * * -o idmap=user -o uid=505 -g gid=505


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 remote:/
home/twong /home/twong/remote
Password: (must enter root pw of remote, do not accept twong pw of
remote)

twong@local$ ls -l /home/twong/remote
ls: /home/twong/remote: Permission denied

root@local# ls -l /home/twong/remote
total 36
drwxr-xr-x 1 twong twong 96 Aug 12 11:42 cert
Files in the /home/twong directory of remote can be listed by root but
not by twong at local.
How to make twong to access the /home/twong directory of remote with
sshfs?

 
Reply With Quote
 
TsanChung
Guest
Posts: n/a

 
      08-15-2008, 02:37 PM
On Aug 15, 9:31*am, TsanChung <tsanchung.w...@gmail.com> wrote:
> On Aug 14, 3:01*pm, Maxwell Lol <nos...@com.invalid> wrote:
>
> > TsanChung <tsanchung.w...@gmail.com> writes:
> > > 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.

>
> > I don't know what sshfs is, but use the id command to check what your UID and GID are.

>
> > Check the FAQ. It says something about *the options

>
> > * * * -o idmap=user -o uid=505 -g gid=505

>
> 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 remote:/
> home/twong /home/twong/remote
> Password: *(must enter root pw of remote, do not accept twong pw of
> remote)
>
> twong@local$ ls -l /home/twong/remote
> ls: /home/twong/remote: Permission denied
>
> root@local# ls -l /home/twong/remote
> total 36
> drwxr-xr-x 1 twong twong * 96 Aug 12 11:42 cert
> Files in the /home/twong directory of remote can be listed by root but
> not by twong at local.
> How to make twong to access the /home/twong directory of remote with
> sshfs?


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

Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nfs gives permission denied pranay.tembhekar@gmail.com Linux Networking 1 05-17-2006 12:25 AM
Workgroup Permission Denied (Usually) Bob Ryan Wireless Networks 1 10-23-2005 10:10 PM
Permission Denied? JBecht Windows Networking 0 10-03-2005 03:25 PM
root rsh permission denied - solution Don S Linux Networking 2 10-03-2003 05:47 PM
Network permission is denied? Tim Walsh Windows Networking 1 09-22-2003 02:33 PM



1 2 3 4 5 6 7 8 9 10 11