#1 2012-04-25 21:26:20


SELINUX and piwigo

Synopsis: being careless while installing piwigo (or other packages) using SELINUX will result in startup errors producing baffling log messages like

[Sat Apr 21 21:57:03 2012] [error] [client] PHP Fatal error:  Unknown: Failed opening required '/var/www/html/photos/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0

I got myself confused while trying to install piwigo while logged as myself using a terminal logged in as root. While me I downloaded the netinstaller and install zip files using a browser, while me I unzipped the zip file to have a look. while root I mv'd the netinstaller to my html directory producing an error similar to above. I then mv'd the piwigo directory to my html directory and also got the above error message.

While investigating whether it was an SELINUX issue I turned off SELINUX and all worked well. By renabling SELINUX and either copying netinstall or unzipping the zip file directly into html/ as root I was able to get things to work properly.

The cause of the problem was this, if as root I had copied (or unzipped) the objects into html/ then all would have been well because I would have created new file system objects with the correct properties. Because I renamed existing objects I moved them over as insecure objects which httpd would not read.

Life would have been so much easier had I had SELINUX logging enabled.



Board footer

Powered by FluxBB

github twitter newsletter Donate © 2002-2022 · Contact