File Ownership (Apache+FTP)

February 9, 2014 2.2k views
Hi there, I am running a server using CentOS 6.5 x64, and i followed the following tutorials: And when i connect to the FTP, the files owner is Apache and the FTP doesnt let me upload/edit/delete the files because of the the files aren't my FTP user, but if i change the ownership to my user, apache can't run it.
3 Answers
Change the ownership to your user and then run the following commands:
sudo chgrp -R apache /path/to/your/files

sudo chown -R g+w /path/to/your/files
can you explain the commands?
The first command sets the group ownership to the group that's called "apache". The second command adds write permissions to members of the group that owns the files (which is apache in this case). This allows apache to write to the files.
Have another answer? Share your knowledge.