Thursday, 22 August 2013

Writing permission with VSFTPD and Centos 6.2

Writing permission with VSFTPD and Centos 6.2

I have a server with centos 6.2 with httpd and vsftpd.
I have few web site in /var/www and i want to add a ftp user for each site.
My user1 home directory is /home/user1 and can read/write to it folder
from ftp. (it's the user i use to ssh and almost everything)
I made user2 which home is /var/www/site2 and bash setting /bin/nologin
(because i want it to be just a ftp user)
I can log in the FTP with the user2 and download file, but i can't upload
file or mkdir...
The permission are
drwxrwxrwx. 2 user2 user2 4096 Aug 21 14:35 .
(the 777 was just for testing...)
My vsftpd.conf is :
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=NO
log_ftp_protocol=YES
chroot_local_user=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
banner_file=/etc/vsftpd/banner
My iptables is currently stop for testing, so the problem is not my
firewall either...
Thank in advance for your help

No comments:

Post a Comment