I didnt want to use home directory because i would be uploading files to var/www/html folder. But i wanted to lock the user to his/her home directory at the same time. Solution:
1) vsftp.conf configuration
local_enable=YES
wite_enable=YES
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_local_user=YES
than save the file..
2) Create a folder in your home dir
mkdir /home/umut/www
3) Bind the real www to the one in your home dir.
mount --bind /var/www/html/ /home/umut/www
{
if you want to (and possibly want to..) create a permanent binding add a line under the /etc/fstab;
/var/www/html /home/umut/www none bind 0 0
}
4) If you have selinux;
setsebool -P ftp_home_dir=1
5) Restart vsftpd
service vsftpd restart
6) If there are writing problems in www than right click on the /var/www/html and select "user data" in selinux area..
for further information:
http://www.ducea.com/2006/07/27/allowing-ftp-access-to-files-outside-the-home-directory-chroot/
Hiç yorum yok:
Yorum Gönder