home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] centos php issue / possibly SELinux

  • Subject: Re: [OCLUG-Tech] centos php issue / possibly SELinux
  • From: "Prof J C Nash (U30A)" <nashjc [ at ] uottawa [ dot ] ca>
  • Date: Tue, 21 Apr 2015 15:07:34 -0400
The issue seems to be SELinux. I created a Centos 7 VM locally (SELinux
seems to be default set to "enforcing") and tried to install Dokuwiki
and got the same error msgs about directories not being writable. Went
to google and found how to disable SELinux (one line in a config file
and reboot). Dokuwiki then working.

So now I need to figure out how to properly set the SELinux policies --
a task I'm not thrilled at having to do, as something that "works" may
not be secure.

Best, JN

On 15-04-19 12:17 PM, David Manouchehri wrote:
> Can you run this on the folder(s) that contain your PHP files?
> 
> find /tmp/ -ls
> 
> If anything there doesn't have the read and/or execute flag set, that's
> probably your problem. I know you've probably already checked this, but
> it's an easy thing to miss. If you want to recursively set all your PHP
> files to have an execute flag, run this. 
> 
> find /tmp/ -type f -iname "*.php" -print0 | xargs -0 chmod +x
> 
> I haven't used SELinux before, though it's basically the same concept.
> They use chcon.
> 
> https://wiki.centos.org/HowTos/SELinux#head-0f6390ddacfab39ee973ed8018a32212c2a02199