This is long story cut short, with vsftp, if i set this parameters in the vsftp.conf file below
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.
, 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
Match user alankoh
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.