httpd_suexec_selinux(8)
๐
httpd_suexec_selinux โ bestie's guide to the SELinux policy for httpd_suexec โจ
okay so this is the httpd_suexec_selinux manual page, from the SELinux Policy httpd_suexec corner of the universe. sit down, hydrate, let's get into it ๐ซถ
โจ NAME โจ
httpd_suexec_selinux โ the Security Enhanced Linux Policy for the httpd_suexec processes. that's the whole vibe, that's the assignment ๐
๐ธ DESCRIPTION ๐ธ
so like, Security-Enhanced Linux secures the httpd_suexec processes via flexible mandatory access control. flexible! mandatory! both! iconic honestly ๐
the httpd_suexec processes execute with the httpd_suexec_t SELinux type. wanna check if you've got these processes running? just run the ps command with the -Z qualifier. fr fr that's it.
for example:
ps -eZ | grep httpd_suexec_t
look at you go, doing process recon ๐ต๏ธโโ๏ธโจ
๐ฆ ENTRYPOINTS ๐ฆ
the httpd_suexec_t SELinux type can be entered via the httpd_suexec_exec_t file type. that's the doorway, that's the portal ๐
the default entrypoint paths for the httpd_suexec_t domain are literally these:
/usr/lib/apache(2)?/suexec(2)?, /usr/lib/cgi-bin/(nph-)?cgiwrap(d)?,
/usr/bin/suexec
๐ PROCESS TYPES ๐
SELinux defines process types (domains) for each process running on the system. one type per process era, basically main character energy for each one ๐ซ
you can see the context of a process using the -Z option to ps.
policy governs the access confined processes have to files. the SELinux httpd_suexec policy is very flexible, allowing users to set up their httpd_suexec processes in as secure a method as possible. secure AND flexible, we love a multihyphenate ๐
the following process types are defined for httpd_suexec:
httpd_suexec_t
Note:semanage permissive -a httpd_suexec_tcan be used to make the process typehttpd_suexec_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it stops blocking you, but it's still writing down everything you do in its little diary ๐๐ญ
๐ BOOLEANS ๐
SELinux policy is customizable based on least access required. the httpd_suexec policy is extremely flexible and has several booleans that allow you to manipulate the policy and run httpd_suexec with the tightest access possible. tightest access possible = the look, the fit, the security ๐โจ
fips_mode โ if you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.
setsebool -P fips_mode 1
httpd_builtin_scripting โ if you want to allow httpd to use built in scripting (usually php), you must turn on the httpd_builtin_scripting boolean. Enabled by default.
setsebool -P httpd_builtin_scripting 1
httpd_can_network_connect โ if you want to allow HTTPD scripts and modules to connect to the network using TCP, you must turn on the httpd_can_network_connect boolean. Disabled by default.
setsebool -P httpd_can_network_connect 1
httpd_can_network_connect_db โ if you want to allow HTTPD scripts and modules to connect to databases over the network, you must turn on the httpd_can_network_connect_db boolean. Disabled by default.
setsebool -P httpd_can_network_connect_db 1
httpd_can_sendmail โ if you want to allow http daemon to send mail, you must turn on the httpd_can_sendmail boolean. Disabled by default.
setsebool -P httpd_can_sendmail 1
httpd_enable_cgi โ if you want to allow httpd cgi support, you must turn on the httpd_enable_cgi boolean. Enabled by default.
setsebool -P httpd_enable_cgi 1
httpd_enable_homedirs โ if you want to allow httpd to read home directories, you must turn on the httpd_enable_homedirs boolean. Disabled by default.
setsebool -P httpd_enable_homedirs 1
httpd_execmem โ if you want to allow httpd scripts and modules execmem/execstack, you must turn on the httpd_execmem boolean. Disabled by default.
setsebool -P httpd_execmem 1
httpd_read_user_content โ if you want to allow httpd to read user content, you must turn on the httpd_read_user_content boolean. Disabled by default.
setsebool -P httpd_read_user_content 1
httpd_tty_comm โ if you want to unify HTTPD to communicate with the terminal. needed for entering the passphrase for certificates at the terminal, you must turn on the httpd_tty_comm boolean. Disabled by default.
setsebool -P httpd_tty_comm 1
httpd_unified โ if you want to unify HTTPD handling of all content files, you must turn on the httpd_unified boolean. Disabled by default.
setsebool -P httpd_unified 1
httpd_use_cifs โ if you want to allow httpd to access cifs file systems, you must turn on the httpd_use_cifs boolean. Disabled by default.
setsebool -P httpd_use_cifs 1
httpd_use_fusefs โ if you want to allow httpd to access FUSE file systems, you must turn on the httpd_use_fusefs boolean. Disabled by default.
setsebool -P httpd_use_fusefs 1
httpd_use_nfs โ if you want to allow httpd to access nfs file systems, you must turn on the httpd_use_nfs boolean. Disabled by default.
setsebool -P httpd_use_nfs 1
nis_enabled โ if you want to allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default.
setsebool -P nis_enabled 1
use_nfs_home_dirs โ if you want to support NFS home directories, you must turn on the use_nfs_home_dirs boolean. Enabled by default.
setsebool -P use_nfs_home_dirs 1
use_samba_home_dirs โ if you want to support SAMBA home directories, you must turn on the use_samba_home_dirs boolean. Disabled by default.
setsebool -P use_samba_home_dirs 1
๐ง MANAGED FILES ๐ง
the SELinux process type httpd_suexec_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. Note: the processes UID still need to have DAC permissions โ SELinux ain't doing your DAC homework for you, bestie ๐ค๐
cifs_t
fusefs_t
/run/user/[0-9]+/gvfs
httpd_suexec_tmp_t
krb5_host_rcache_t
/var/tmp/krb5_0.rcache2
/var/cache/krb5rcache(/.*)?
/var/tmp/nfs_0
/var/tmp/DNS_25
/var/tmp/host_0
/var/tmp/imap_0
/var/tmp/HTTP_23
/var/tmp/HTTP_48
/var/tmp/ldap_55
/var/tmp/ldap_487
/var/tmp/ldapmap1_0
nfs_t
๐ FILE CONTEXTS ๐
SELinux requires files to have an extended attribute to define the file type. yes, every file has a little aura and SELinux is reading it ๐ฎ
you can see the context of a file using the -Z option to ls.
policy governs the access confined processes have to these files. the SELinux httpd_suexec policy is very flexible, allowing users to set up their httpd_suexec processes in as secure a method as possible. (yes she said it again, she means it ๐
)
๐ STANDARD FILE CONTEXT ๐
SELinux defines the file context types for the httpd_suexec. if you wanted to store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk. relocate the files, keep the labels, that's the whole trick โจ
semanage fcontext -a -t httpd_suexec_exec_t
'/srv/httpd_suexec/content(/.*)?'
restorecon -R -v /srv/myhttpd_suexec_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies stay winning ๐ฏ
the following file types are defined for httpd_suexec:
httpd_suexec_exec_t
- set files with the
httpd_suexec_exec_ttype, if you want to transition an executable to thehttpd_suexec_tdomain.
paths:
/usr/lib/apache(2)?/suexec(2)?, /usr/lib/cgi-bin/(nph-)?cgiwrap(d)?,
/usr/bin/suexec
httpd_suexec_tmp_t
- set files with the
httpd_suexec_tmp_ttype, if you want to store httpd suexec temporary files in the/tmpdirectories.
Note: file context can be temporarily modified with thechconcommand. if you want to permanently change the file context you need to use thesemanage fcontextcommand. this will modify the SELinux labeling database. you will need to userestoreconto apply the labels.chconis the cute temporary tattoo,semanage fcontextis the real ink, no cap ๐๏ธ๐
โญ COMMANDS โญ
semanage fcontextcan also be used to manipulate default file context mappings.semanage permissivecan also be used to manipulate whether or not a process type is permissive.semanage modulecan also be used to enable/disable/install/remove policy modules.semanage booleancan also be used to manipulate the booleanssystem-config-selinuxis a GUI tool available to customize SELinux policy settings. a GUI!! for the mouse girlies ๐ฑ๏ธ๐
๐ AUTHOR ๐
this manual page was auto-generated using sepolicy manpage. the robots wrote this one, respect to them ๐ค๐ซถ
๐ SEE ALSO ๐
selinux(8), httpd_suexec(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
and that's the page, bestie!! mwah ๐ this whole thing is httpd_suexec, dated 26-10-06, living its best life in section httpd_suexec_selinux(8). go forth and label responsibly ๐ฅ๐
๐ฆ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms