CentOS 6.4 - PHP-FPM and SELinux...
On a system with SELinux enabled (Enforced mode), you might encounter security issues when using PHP Sessions with the default PHP-COMMON and PHP-FPM configurations. By default, sessions will be stored in /var/lib/php/sessions.
If SELinux denies writing in the sessions directory, error messages should be displayed in the /var/log/security file.
The setting is stored in two files: /etc/php.ini
and /etc/php-fpm.d/www.conf (or so)
If you think it is a good idea to store sessions in this directory, you might have to create an SELinux policy to allow the user running your PHP code (httpd or apache for most setups).
The audit2allow utility will ease your task but you might have to install it.
For those you wonder how to find package containing a command or utility on YUM based distribution, here you go…
Now that the tool is installed, you can run the following command as root:
Look at this article for more information on this topic.
blog comments powered by Disqus