Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
[vsftpd]File rights problem with web server (Apache)
I have been searching around to find an explanation or a tutorial, but I still have this problem.
I am configuring a web server on a CentOS, and I want web server files to be uploaded through FTP.
So I set up vsftpd. Currently, it is working BUT I have a problem of rights...
By "default", /var/www/html is owned by apache.
But the ftp is uploading files owned by the ftp user. More problematic, I can't modify or suppress anything, because files are owned by apache.
I tried :
- adding ftp to apache group (files affected to apache group with the good rights) : I can modify existing files through FTP, but any new file added through FTP is still owned by ftp
- user nobody and group nobody for these files, but then FTP list is empty (vsftpd config for my user : "anon_world_readable_only=NO")
I don't know what to do there...
Thanks for any help !
- Join Date
- Jul 2009
FTP uses the login name as the owner of the files. Don't use 'root' as your ftp user. Create a new user, put them in a 'www' group and change the /var/www/html directory to be owned by www.
search for stickybit, and umask on how to use them properly to keep the group permissions as new files are created.