0

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

1 Answer 1

1

s/755/2775/

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.

3
  • with 2775, when connect with FTP client i have this error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot() Commented May 8, 2015 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. Commented May 8, 2015 at 16:54
  • I resolved inserted allow_writeable_chroot=YES to vsftpd.conf...seems to work Commented May 8, 2015 at 17:11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.