On Tue, May 21, 2013 at 12:59:55PM -0700, Philip Guenther wrote:
> On Tue, May 21, 2013 at 12:52 PM, Jiri B <[email protected]> wrote:
> > I'm very surprised to see something like this. Comparing with
> > normal unix filesystem, 'sftpuser' would not even enter such
> > directory.
>
> Reeeeeally.
>
> $ ls -l
> total 8
> drwx-----x 2 2000 2000 512 May 21 12:57 foo
> $ id
> uid=1000(guenther) gid=1000(guenther) groups=1000(guenther), 0(wheel)
> $ cd foo
> $ ls -l
> ls: .: Permission denied
> $
>
> > drwx-----x 12 1000 1000 512 May 21 18:32 jirib
>
> Executable by processes that have neither uid 1000 or gid 1000.
> What's the problem?
Ah... this was forgotten for mpd, anyway this is not the case, see
with 700 mode. Is sftp just pretending to enter that directory?
sftp> cd /
sftp> ls -l
drwxr-xr-x 2 0 0 512 May 21 18:43 dev
drwx------ 12 1000 1000 512 May 21 18:32 jirib
drwxr-xr-x 10 1000 1000 512 May 21 18:32 pub
sftp> cd jirib
sftp> ls -al
remote readdir("/jirib"): Permission denied
vs
$ id
uid=1000(jirib) gid=1000(jirib) groups=1000(jirib), 0(wheel), 5(operator),
9(wsrc)
$ cd /home/toruser
ksh: cd: /home/toruser - Permission denied
$ ls -ld /home/toruser
drwx------ 18 toruser toruser 1024 May 21 20:00 /home/toruser/
j.