Christian_Heutger
Basic Pleskian
As of CentOS 7 the system comes shipped with selinux enabled by default. It has a reason, why distributions choose to enable selinux, switch to systemd etc., so it can't be the solution to disable selinux manually. So finally Plesk 12 must then be stated as incompatible with CentOS 7 or the paid RedHat Enterprise Linux 7 although the official documentation states different.
BUT there are some possibilities to get it somehow running (a bit), just requires always to perform
#audit2allow -a -M mypolicy
#semodule -i mypolicy.pp (maybe require to install policycoreutils-python via yum if not done yet)
It's also possible to see, what all get's wrong, so if you wonder, why fail2ban daemon fails, why proftpd does not create any log entries, why you aren't able to write to different locations or postfix fails to solve host names, just check the output of mypolicy.te (cat mypolicy.te) and see which policies are not set by Parallels. However, I opened also a CentOS bug, maybe CentOS is willing to do the job for Parallels/Odin. Here is a initial output after fresh update of selinux-policy with basic problems just after a reboot:
module mypolicy 1.0;
require {
type mail_spool_t;
type var_run_t;
type var_t;
type fail2ban_t;
type usr_t;
type postfix_postdrop_t;
type httpd_t;
type iptables_t;
type fail2ban_client_t;
type var_log_t;
type httpd_log_t;
type sendmail_t;
type httpd_sys_rw_content_t;
type cron_log_t;
type spamd_update_t;
type ftpd_t;
type httpd_sys_content_t;
type system_mail_t;
type spamd_t;
type dhcpc_t;
class sock_file { write create };
class lnk_file getattr;
class dir { write getattr read open search };
class file { write rename getattr read open ioctl };
}
#============= dhcpc_t ==============
#!!!! This avc is allowed in the current policy
allow dhcpc_t httpd_sys_content_t:file getattr;
#============= fail2ban_client_t ==============
#!!!! This avc is allowed in the current policy
allow fail2ban_client_t var_run_t:dir write;
#!!!! This avc is allowed in the current policy
allow fail2ban_client_t var_run_t:sock_file write;
#============= fail2ban_t ==============
#!!!! This avc is allowed in the current policy
allow fail2ban_t var_run_t:sock_file create;
#============= ftpd_t ==============
#!!!! This avc is allowed in the current policy
allow ftpd_t cron_log_t:file open;
#!!!! This avc is allowed in the current policy
allow ftpd_t httpd_log_t:dir { read getattr open search };
#!!!! This avc is allowed in the current policy
allow ftpd_t httpd_log_t:file read;
#!!!! This avc is allowed in the current policy
allow ftpd_t httpd_log_t:lnk_file getattr;
#============= httpd_t ==============
#!!!! This avc is allowed in the current policy
allow httpd_t httpd_log_t:dir read;
#!!!! This avc is allowed in the current policy
allow httpd_t mail_spool_t:file rename;
#!!!! This avc is allowed in the current policy
allow httpd_t var_log_t:file open;
#!!!! This avc is allowed in the current policy
allow httpd_t var_t:file { read write };
#============= iptables_t ==============
#!!!! This avc is allowed in the current policy
allow iptables_t httpd_log_t:file read;
#============= postfix_postdrop_t ==============
#!!!! This avc is allowed in the current policy
allow postfix_postdrop_t httpd_sys_rw_content_t:file write;
#============= sendmail_t ==============
#!!!! This avc is allowed in the current policy
allow sendmail_t var_t:file write;
#============= spamd_t ==============
#!!!! This avc is allowed in the current policy
allow spamd_t httpd_sys_content_t:file ioctl;
#============= spamd_update_t ==============
#!!!! This avc is allowed in the current policy
allow spamd_update_t httpd_sys_content_t:file open;
#============= system_mail_t ==============
#!!!! This avc is allowed in the current policy
allow system_mail_t httpd_sys_rw_content_t:file getattr;
#!!!! This avc is allowed in the current policy
allow system_mail_t usr_t:file write;
BUT there are some possibilities to get it somehow running (a bit), just requires always to perform
#audit2allow -a -M mypolicy
#semodule -i mypolicy.pp (maybe require to install policycoreutils-python via yum if not done yet)
It's also possible to see, what all get's wrong, so if you wonder, why fail2ban daemon fails, why proftpd does not create any log entries, why you aren't able to write to different locations or postfix fails to solve host names, just check the output of mypolicy.te (cat mypolicy.te) and see which policies are not set by Parallels. However, I opened also a CentOS bug, maybe CentOS is willing to do the job for Parallels/Odin. Here is a initial output after fresh update of selinux-policy with basic problems just after a reboot:
module mypolicy 1.0;
require {
type mail_spool_t;
type var_run_t;
type var_t;
type fail2ban_t;
type usr_t;
type postfix_postdrop_t;
type httpd_t;
type iptables_t;
type fail2ban_client_t;
type var_log_t;
type httpd_log_t;
type sendmail_t;
type httpd_sys_rw_content_t;
type cron_log_t;
type spamd_update_t;
type ftpd_t;
type httpd_sys_content_t;
type system_mail_t;
type spamd_t;
type dhcpc_t;
class sock_file { write create };
class lnk_file getattr;
class dir { write getattr read open search };
class file { write rename getattr read open ioctl };
}
#============= dhcpc_t ==============
#!!!! This avc is allowed in the current policy
allow dhcpc_t httpd_sys_content_t:file getattr;
#============= fail2ban_client_t ==============
#!!!! This avc is allowed in the current policy
allow fail2ban_client_t var_run_t:dir write;
#!!!! This avc is allowed in the current policy
allow fail2ban_client_t var_run_t:sock_file write;
#============= fail2ban_t ==============
#!!!! This avc is allowed in the current policy
allow fail2ban_t var_run_t:sock_file create;
#============= ftpd_t ==============
#!!!! This avc is allowed in the current policy
allow ftpd_t cron_log_t:file open;
#!!!! This avc is allowed in the current policy
allow ftpd_t httpd_log_t:dir { read getattr open search };
#!!!! This avc is allowed in the current policy
allow ftpd_t httpd_log_t:file read;
#!!!! This avc is allowed in the current policy
allow ftpd_t httpd_log_t:lnk_file getattr;
#============= httpd_t ==============
#!!!! This avc is allowed in the current policy
allow httpd_t httpd_log_t:dir read;
#!!!! This avc is allowed in the current policy
allow httpd_t mail_spool_t:file rename;
#!!!! This avc is allowed in the current policy
allow httpd_t var_log_t:file open;
#!!!! This avc is allowed in the current policy
allow httpd_t var_t:file { read write };
#============= iptables_t ==============
#!!!! This avc is allowed in the current policy
allow iptables_t httpd_log_t:file read;
#============= postfix_postdrop_t ==============
#!!!! This avc is allowed in the current policy
allow postfix_postdrop_t httpd_sys_rw_content_t:file write;
#============= sendmail_t ==============
#!!!! This avc is allowed in the current policy
allow sendmail_t var_t:file write;
#============= spamd_t ==============
#!!!! This avc is allowed in the current policy
allow spamd_t httpd_sys_content_t:file ioctl;
#============= spamd_update_t ==============
#!!!! This avc is allowed in the current policy
allow spamd_update_t httpd_sys_content_t:file open;
#============= system_mail_t ==============
#!!!! This avc is allowed in the current policy
allow system_mail_t httpd_sys_rw_content_t:file getattr;
#!!!! This avc is allowed in the current policy
allow system_mail_t usr_t:file write;