0

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.

marked as duplicate by Michael Hampton linux Mar 28 '18 at 16:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

Solved, it was a selinux configuration problem. Found an answer here https://stackoverflow.com/a/37258323/2573303

Not the answer you're looking for? Browse other questions tagged or ask your own question.