• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

SElinux, proftpd + httpd_sys_rw_content_t dir

Burnout

New Pleskian
Hi,

On a CentOS (6) system, when the httpd service creates a directory, it gets the following selinux properties: "scontext=system_u:system_r:ftpd_t:s0-s0:c0.c1023 tcontext=system_u:eek:bject_r:httpd_sys_rw_content_t:s0 tclass=dir"

Now, this directory isn't readable or writable with proftpd. How can I give proftpd access to the directory?
Keep in mind, I don't want to turn of SElinux or edit the allow_ftpd_full_access boolean. Also I prefer to not edit the fcontext.

Thx for your feedback!


Kind regards,
Burn
 
For whom it might interest, I did some investigations and managed to write the following (working) module:
Code:
module ftpd.custom 1.0;

require {
   type ftpd_t;
   type httpd_sys_rw_content_t;
   class file { create open unlink setattr };
   class dir { read add_name search rmdir getattr write create open setattr remove_name rename };
}

#============= ftpd_t ==============

#!!!! This avc can be allowed using the boolean 'allow_ftpd_full_access'
allow ftpd_t httpd_sys_rw_content_t:dir { create read add_name search rmdir getattr write open remove_name setattr rename };
allow ftpd_t httpd_sys_rw_content_t:file { create open unlink setattr };

If you want to use it, you need to check, compile and load it:
Code:
# checkmodule -M -m -o ftpd.custom.mod ftpd.custom.te
# semodule_package -o ftpd.custom.pp -m ftpd.custom.mod
# semodule -i ftpd.custom.pp
 
Back
Top