Directory permissions in chroot SFTP
Damien Miller
djm at mindrot.org
Fri Jan 15 14:50:18 EST 2010
On Thu, 14 Jan 2010, Chris Adams wrote:
> Once upon a time, Damien Miller <djm at mindrot.org> said:
> > On Wed, 13 Jan 2010, Michael Masterson wrote:
> > > > Right, this is on purpose. We ban this because allowing a user write
> > > > access to a chroot target is dangerously similar to equivalence with
> > > > allowing write access to the root of a filesystem.
> > >
> > > Could you tell me what the *real* dangers of allowing SFTP only users to write
> > > to their directories?
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=522141
>
> I guess I'm missing something - how does an SFTP-only user run
> something?
Server misconfiguration, bugs in sshd's unprivileged code, bugs in
sftp-server.
> Is there another way to restrict SFTP to a user's home directory?
No, and I don't think one is necessary. If having to create a
subdirectory (which users can automatically be cd'd to on sftp login) is
so onerous then feel free to reintroduce CVE-2009-2904 by removing the
checks in session.c:safely_chroot().
-d
More information about the openssh-unix-dev
mailing list