I need create a FTP server to upload files directly to apache directory. I have create user with: useradd -G wheel,apache newuser and set password with passwd newuser

I have changed home directory of newuser in /etc/passwd file from /home/newuser to /var/www/html_newuser and set permission to folder: /var/www/html_newuser with:

chown -R apache.apache /var/www/html_newuser and chmod -R 755 /var/www/html_newuser

When i try to upload file into FTP directory i have

553 Could not create file.

P.S. The same configuration work perfectly in Centos 6.5, this is a Centos 7



You're setting the owner to apache, denying group write permissions, and using newuser to attempt to upload. Given your scheme, you want to allow group write permissions, and I recommend 2775 versus 775 in order to keep new files owned by the apache group at creation.

  • with 2775, when connect with FTP client i have this error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot() – hellb0y77 May 8 '15 at 16:45
  • Then you need to either make the directory owned by the newuser user, or you need to modify the VSFTPd configuration. Either way, this is not the same configuration as you have on your CentOS 6.5 server, or you would be getting identical errors. – John May 8 '15 at 16:54
  • I resolved inserted allow_writeable_chroot=YES to vsftpd.conf...seems to work – hellb0y77 May 8 '15 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.