Page 1 of 1

apache / php cannot write in folder

Posted: 2016/01/20 15:31:41
by gluehbirne
Hi there,

i am quite new in linux servers. probably aou are asick of these guys but everybody started once :-)

so - i try to install an issue tracking system on CentOS7 with httpd, mariadb an php5. Now everything was fine - html-docs can be displayed, phpinfo is shown and wordpress can be installed. i thought ok - thats it - but when i try to install osticket or itop there are problems. php / apache cannot create files.

User apache is owner of the complete directory /var recursive and permissions are 777. it is quite frustration and i am try to find a solutin for the last 5 hours - it is really frustrating. for centos pro´s this could be a marginal problem :-)

i tried to deactivate selinux - but now centos seems to be crashed.

for any help thanks in advance

Re: apache / php cannot write in folder

Posted: 2016/01/20 15:58:31
by TrevorH
User apache is owner of the complete directory /var recursive and permissions are 777. it is quite frustration and i am try to find a solutin for the last 5 hours - it is really frustrating. for centos pro´s this could be a marginal problem :-)

i tried to deactivate selinux - but now centos seems to be crashed.
Frankly, given all that lot, I'd wipe your system and start over. This time do not disable selinux, do not change the ownership of /var and do not set permissions of 777 on anything.

Re: apache / php cannot write in folder

Posted: 2016/01/20 16:14:14
by gluehbirne
I know - it is not recommended and not safe. The Server online runs in LAN. First of all i have to get the Systems installed, after that the full permissions can ne deleted. My topic is to get installed the Systems in this testing network. So security is not that important.

Re: apache / php cannot write in folder

Posted: 2016/01/20 16:37:10
by TrevorH
Security is always important and it;s very possible that the changes you made are actually causing your issues.

Re: apache / php cannot write in folder

Posted: 2016/01/20 16:50:58
by gluehbirne
So - why should full permission bei the reason for that? I also tried it with less permissions. Something is wrong with php and Apache i guess. Security is important for sure - But i tried several things

Re: apache / php cannot write in folder

Posted: 2016/01/21 13:18:14
by gerald_clark
Your changes have masked the original problem, and you have dug a hole that is very difficult to climb out of.