Writing permission with VSFTPD and Centos 6.2

frank picture frank · Aug 21, 2013 · Viewed 7k times · Source

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 have a directory in /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 with it's home /var/www/site2 and /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 it isn't my firewall either...

Thank in advance for your help

Answer

frank picture frank · Aug 23, 2013

Sorry, wrong site my bad...

I post my question at Serverfault and got an answer, so here is the link!

https://serverfault.com/questions/532949/writing-permission-with-vsftpd-and-centos-6-2