• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Is plesk compatible with selinux?

Oto Tortorella

Basic Pleskian
I'm having many trouble trying to use plesk 12.5 with selinux enabled.

First, this one involving FastCGI, read here:
https://kb.odin.com/en/125072

Then I cannot upload files using PHP (WordPress)m but it works if I disable SElinux.

My question is: are you using plesk with SElinux unabled?
If not, is Plesk compatible?
And last, if it is not fully compatible why Odin isn't declaring that clearly?

Thank You
Oto Tortorella
TeleType
 
I get this errors with selinux enabled:
Code:
[Fri Dec 11 18:30:16.954440 2015] [fcgid:warn] [pid 5733:tid 140581234644736] [client 2.35.xxx.xxx:62094] mod_fcgid: stderr: PHP Warning:  session_start(): open(/var/lib/php/session/sess_vtqjojma8rn8qdrqbmpfd81st3, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/website.it/httpdocs/wp-content/plugins/wpchef-salon-booking-plugin-26002cce9e53/src/SLN/Third/GoogleScope.php on line 3, referer: http://www.website.it/wp-admin/plugins.php
[Fri Dec 11 18:30:16.954489 2015] [fcgid:warn] [pid 5733:tid 140581234644736] [client 2.35.xxx.xxx:62094] mod_fcgid: stderr: PHP Warning:  scandir(/var/www/vhosts/website.it/httpdocs/wp-content/languages/plugins): failed to open dir: Permission denied in /var/www/vhosts/website.it/httpdocs/wp-includes/l10n.php on line 887, referer: http://www.website.it/wp-admin/plugins.php
[Fri Dec 11 18:30:16.954494 2015] [fcgid:warn] [pid 5733:tid 140581234644736] [client 2.35.xxx.xxx:62094] mod_fcgid: stderr: PHP Warning:  scandir(): (errno 13): Permission denied in /var/www/vhosts/website.it/httpdocs/wp-includes/l10n.php on line 887, referer: http://www.website.it/wp-admin/plugins.php
[Fri Dec 11 18:30:16.960383 2015] [fcgid:warn] [pid 5733:tid 140581234644736] [client 2.35.xxx.xxx:62094] mod_fcgid: stderr: PHP Warning:  Unknown: open(/var/lib/php/session/sess_vtqjojma8rn8qdrqbmpfd81st3, O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer: http://www.website.it/wp-admin/plugins.php
[Fri Dec 11 18:30:16.960416 2015] [fcgid:warn] [pid 5733:tid 140581234644736] [client 2.35.xxx.xxx:62094] mod_fcgid: stderr: PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0, referer: http://www.website.it/wp-admin/plugins.php

Any advice?
 
Hi,

To configure SELinux you need to know the rules that should be added into the system policy.

SELinux reports all denied messages into the /var/log/audit/audit.log file and these messages can be easily converted into the rules using the /usr/bin/audit2allow utility.

cat /var/log/messages | /usr/bin/audit2allow

/var/log/messages.* files can be examined for the SELinux deny messages.

Thank you,
 
Yes, but this is a fresh installation of Plesk 12.5 on CentOS 7.1!
Do plesk support selinux out of the box?
Or should I configure rules for every single site or installation?
 
I ended up disabling SElinux.

The file with SElinux messages is /var/log/audit/audit.log, there were many denied messages.
The point is that I'm working on a fresh installed Plesk 12.5 version and WordPress, I was working on, has been installed by the Plesk Application installer.
So that Plesk is not able to correctly configure SElinux default policies for its own managed application.
Am I wrong?
 
Please abdi, I see you are an expert, be more specific.

On a fresh installation, with SElinux enabled and using PHP 5.3 FastCGI, can I use the Application Installer to install WordPress and will it work correctly?
I ask 'cause that is not my case, I have several problems and denies.
It's my fault or not?
I do not want to fiddle constantly with SElinux rules, if it is not fully supported, I will disable it.

Thank you
Oto Tortorella
 
Back
Top