This question already has an answer here:
Hi I'm trying to deply a webapp to my server who currently runs Centos and I have the issue that I can not write to files inside the public app dir. My directory structure is as follows, there you can see permissions on each directory. The list runs from the index.php file to the root directory.
-rwxrwxr-x. 1 myuser apache 102 Mar 28 08:08 /var/www/mypage/public/index.php drwxrwxrwx. 2 myuser apache 4096 Mar 28 07:39 /var/www/mypage/public drwxrwxr-x. 3 myuser apache 4096 Mar 28 07:39 /var/www/mypage drwxr-xr-x. 9 myuser apache 4096 Mar 28 07:38 /var/www drwxr-xr-x. 20 myuser apache 4096 Nov 6 09:16 /var
The server throws an error that says that the server has no permissions to write to a file inside the public directory.
The server runs as apache and the user myuser is on the apache group.
So, what can be happening? I have other projects inside the same directory and they have the same folder structure and permission but with no permissions error.