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.
|