sftp + chrooting users

Christer Solskogen solskogen at carebears.mine.nu
Sun Aug 9 17:18:54 UTC 2009


On 8/9/09 4:29 PM, Stefan Miklosovic wrote:
> hi all,
>
> I am about chrooting ftp users into theirs home
> directories. I've following in the end of /etc/ssh/sshd_config
>
> Subsystem      sftp   internal-sftp
>
> Match group ftp
>           ChrootDirectory /home
>           X11Forwarding no
>           AllowTcpForwarding no
>           ForceCommand internal-sftp
>

I have this in my sshd_config:
Match Group sftponly
          ChrootDirectory /usr/home/%u
          X11Forwarding no
          AllowTcpForwarding no
          ForceCommand internal-sftp

But also note that the user(which is in the sftponly group) have / as 
his home directory.

-- 
chs




More information about the freebsd-questions mailing list