I have a CentOS VPS. The problem is my html files in /var/www/html seem to need to be owned by the apache user in order for some web applications to work (ie file uploads). If they are owned by the apache user, the web apps work but my ftp user no longer has access to the files. If they are owned by the ftp user, then the web apps stop working again.
What can I do to solve this? The only temp solution for the moment is keep them owned by the ftp user and give the directories 777 that need file uploads. I understand that this isn't secure though?
CentOS is setup with the default Apache config. FTP is proftpd and my user is in an ftpusers
group.
You can use groups.
It is recommended to change the primary group of the user using the command:
Other groups can be added using
-a -G
options. Also, the new group will not be seen in the current shell, you can to logout and login again.