• Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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