Dear all,
This is long story cut short, with vsftp, if i set this parameters in the vsftp.conf file below
Code:
local_enable=YES
chroot_local_users=YES
I am able to login to the ftp account, see and list my home/user directory, and if i do a cd / or cd .. , i will still be chroot to my /home/user directory.
without, the need to chmod or or chown anything to my /home/user directory
=============================================
With openSSH, internal_sftp, even though I have set the sshd_conf to
Code:
Match user alankoh
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
ChrootDirectory /home/%u
I will need to change owner my /home/user directory to have root becomes it owner.
============================================
Q1) why this difference ? How does vsftp chroot without changing the /home/user folder ownership ?
Q2) i realize that openssh ChrootDirectory parameter causes my default login directory to be set as that of the parameter.
(e.g. if i set to "/whatever/xyz", i will be brought to that /whatever/xyz everytime i login to the sftp instead of my /home/user folder.
Why ? I thought that ChrootDirectory is just a security measure to specify the directory to go to in case the user cd to root (e.g. cd /), else not, i should still go to my /home/user folder everytime i login to sftp.
Regards,
Noob