1httpd_suexec_selinux(8)   SELinux Policy httpd_suexec  httpd_suexec_selinux(8)
2
3
4

NAME

6       httpd_suexec_selinux   -   Security   Enhanced  Linux  Policy  for  the
7       httpd_suexec processes
8

DESCRIPTION

10       Security-Enhanced Linux secures the httpd_suexec processes via flexible
11       mandatory access control.
12
13       The  httpd_suexec  processes  execute  with  the httpd_suexec_t SELinux
14       type. You can check if you have these processes  running  by  executing
15       the ps command with the -Z qualifier.
16
17       For example:
18
19       ps -eZ | grep httpd_suexec_t
20
21
22

ENTRYPOINTS

24       The    httpd_suexec_t   SELinux   type   can   be   entered   via   the
25       httpd_suexec_exec_t file type.
26
27       The default entrypoint paths for the httpd_suexec_t domain are the fol‐
28       lowing:
29
30       /usr/lib/apache(2)?/suexec(2)?,    /usr/lib/cgi-bin/(nph-)?cgiwrap(d)?,
31       /usr/sbin/suexec
32

PROCESS TYPES

34       SELinux defines process types (domains) for each process running on the
35       system
36
37       You can see the context of a process using the -Z option to ps
38
39       Policy  governs  the  access confined processes have to files.  SELinux
40       httpd_suexec policy is very flexible  allowing  users  to  setup  their
41       httpd_suexec processes in as secure a method as possible.
42
43       The following process types are defined for httpd_suexec:
44
45       httpd_suexec_t
46
47       Note:  semanage  permissive  -a  httpd_suexec_t can be used to make the
48       process type httpd_suexec_t permissive. SELinux does not deny access to
49       permissive  process  types,  but the AVC (SELinux denials) messages are
50       still generated.
51
52

BOOLEANS

54       SELinux  policy  is  customizable  based  on  least  access   required.
55       httpd_suexec policy is extremely flexible and has several booleans that
56       allow you to manipulate the policy and run httpd_suexec with the tight‐
57       est access possible.
58
59
60
61       If you want to allow users to resolve user passwd entries directly from
62       ldap rather then using a sssd server, you  must  turn  on  the  authlo‐
63       gin_nsswitch_use_ldap boolean. Disabled by default.
64
65       setsebool -P authlogin_nsswitch_use_ldap 1
66
67
68
69       If  you  want  to deny any process from ptracing or debugging any other
70       processes, you  must  turn  on  the  deny_ptrace  boolean.  Enabled  by
71       default.
72
73       setsebool -P deny_ptrace 1
74
75
76
77       If  you  want  to  allow  any  process  to mmap any file on system with
78       attribute file_type, you must turn on the  domain_can_mmap_files  bool‐
79       ean. Enabled by default.
80
81       setsebool -P domain_can_mmap_files 1
82
83
84
85       If  you want to allow all domains write to kmsg_device, while kernel is
86       executed with systemd.log_target=kmsg parameter, you must turn  on  the
87       domain_can_write_kmsg boolean. Disabled by default.
88
89       setsebool -P domain_can_write_kmsg 1
90
91
92
93       If you want to allow all domains to use other domains file descriptors,
94       you must turn on the domain_fd_use boolean. Enabled by default.
95
96       setsebool -P domain_fd_use 1
97
98
99
100       If you want to allow all domains to have the kernel load  modules,  you
101       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
102       default.
103
104       setsebool -P domain_kernel_load_modules 1
105
106
107
108       If you want to allow all domains to execute in fips_mode, you must turn
109       on the fips_mode boolean. Enabled by default.
110
111       setsebool -P fips_mode 1
112
113
114
115       If you want to enable reading of urandom for all domains, you must turn
116       on the global_ssp boolean. Disabled by default.
117
118       setsebool -P global_ssp 1
119
120
121
122       If you want to allow httpd to use built in scripting (usually php), you
123       must turn on the httpd_builtin_scripting boolean. Enabled by default.
124
125       setsebool -P httpd_builtin_scripting 1
126
127
128
129       If  you  want to allow HTTPD scripts and modules to connect to the net‐
130       work using TCP, you must turn on the httpd_can_network_connect boolean.
131       Disabled by default.
132
133       setsebool -P httpd_can_network_connect 1
134
135
136
137       If  you want to allow HTTPD scripts and modules to connect to databases
138       over the network, you must  turn  on  the  httpd_can_network_connect_db
139       boolean. Disabled by default.
140
141       setsebool -P httpd_can_network_connect_db 1
142
143
144
145       If  you  want  to  allow http daemon to send mail, you must turn on the
146       httpd_can_sendmail boolean. Disabled by default.
147
148       setsebool -P httpd_can_sendmail 1
149
150
151
152       If you  want  to  allow  httpd  cgi  support,  you  must  turn  on  the
153       httpd_enable_cgi boolean. Enabled by default.
154
155       setsebool -P httpd_enable_cgi 1
156
157
158
159       If  you  want to allow httpd to read home directories, you must turn on
160       the httpd_enable_homedirs boolean. Disabled by default.
161
162       setsebool -P httpd_enable_homedirs 1
163
164
165
166       If you want to allow httpd scripts and modules  execmem/execstack,  you
167       must turn on the httpd_execmem boolean. Disabled by default.
168
169       setsebool -P httpd_execmem 1
170
171
172
173       If  you  want to allow httpd to read user content, you must turn on the
174       httpd_read_user_content boolean. Disabled by default.
175
176       setsebool -P httpd_read_user_content 1
177
178
179
180       If you want to unify HTTPD to communicate with the terminal. Needed for
181       entering the passphrase for certificates at the terminal, you must turn
182       on the httpd_tty_comm boolean. Disabled by default.
183
184       setsebool -P httpd_tty_comm 1
185
186
187
188       If you want to unify HTTPD handling of all content files, you must turn
189       on the httpd_unified boolean. Disabled by default.
190
191       setsebool -P httpd_unified 1
192
193
194
195       If  you  want to allow httpd to access cifs file systems, you must turn
196       on the httpd_use_cifs boolean. Disabled by default.
197
198       setsebool -P httpd_use_cifs 1
199
200
201
202       If you want to allow httpd to access FUSE file systems, you  must  turn
203       on the httpd_use_fusefs boolean. Disabled by default.
204
205       setsebool -P httpd_use_fusefs 1
206
207
208
209       If you want to allow httpd to access nfs file systems, you must turn on
210       the httpd_use_nfs boolean. Disabled by default.
211
212       setsebool -P httpd_use_nfs 1
213
214
215
216       If you want to allow confined applications to run  with  kerberos,  you
217       must turn on the kerberos_enabled boolean. Enabled by default.
218
219       setsebool -P kerberos_enabled 1
220
221
222
223       If  you  want  to  allow  system  to run with NIS, you must turn on the
224       nis_enabled boolean. Disabled by default.
225
226       setsebool -P nis_enabled 1
227
228
229
230       If you want to allow confined applications to use nscd  shared  memory,
231       you must turn on the nscd_use_shm boolean. Disabled by default.
232
233       setsebool -P nscd_use_shm 1
234
235
236
237       If  you  want to allow unprivileged users to execute DDL statement, you
238       must turn  on  the  postgresql_selinux_users_ddl  boolean.  Enabled  by
239       default.
240
241       setsebool -P postgresql_selinux_users_ddl 1
242
243
244
245       If  you  want  to  support  NFS  home directories, you must turn on the
246       use_nfs_home_dirs boolean. Disabled by default.
247
248       setsebool -P use_nfs_home_dirs 1
249
250
251
252       If you want to support SAMBA home directories, you  must  turn  on  the
253       use_samba_home_dirs boolean. Disabled by default.
254
255       setsebool -P use_samba_home_dirs 1
256
257
258

MANAGED FILES

260       The  SELinux  process type httpd_suexec_t can manage files labeled with
261       the following file types.  The paths listed are the default  paths  for
262       these  file  types.  Note the processes UID still need to have DAC per‐
263       missions.
264
265       cifs_t
266
267
268       fusefs_t
269
270            /var/run/user/[^/]*/gvfs
271
272       httpd_suexec_tmp_t
273
274
275       nfs_t
276
277
278

FILE CONTEXTS

280       SELinux requires files to have an extended attribute to define the file
281       type.
282
283       You can see the context of a file using the -Z option to ls
284
285       Policy  governs  the  access  confined  processes  have to these files.
286       SELinux httpd_suexec policy is very flexible allowing  users  to  setup
287       their httpd_suexec processes in as secure a method as possible.
288
289       STANDARD FILE CONTEXT
290
291       SELinux  defines  the  file  context types for the httpd_suexec, if you
292       wanted to store files with these types in a diffent paths, you need  to
293       execute  the  semanage  command to sepecify alternate labeling and then
294       use restorecon to put the labels on disk.
295
296       semanage fcontext -a  -t  httpd_suexec_tmp_t  '/srv/myhttpd_suexec_con‐
297       tent(/.*)?'
298       restorecon -R -v /srv/myhttpd_suexec_content
299
300       Note:  SELinux  often  uses  regular expressions to specify labels that
301       match multiple files.
302
303       The following file types are defined for httpd_suexec:
304
305
306
307       httpd_suexec_exec_t
308
309       - Set files with the httpd_suexec_exec_t type, if you want  to  transi‐
310       tion an executable to the httpd_suexec_t domain.
311
312
313       Paths:
314            /usr/lib/apache(2)?/suexec(2)?,       /usr/lib/cgi-bin/(nph-)?cgi‐
315            wrap(d)?, /usr/sbin/suexec
316
317
318       httpd_suexec_tmp_t
319
320       - Set files with the httpd_suexec_tmp_t type,  if  you  want  to  store
321       httpd suexec temporary files in the /tmp directories.
322
323
324
325       Note:  File context can be temporarily modified with the chcon command.
326       If you want to permanently change the file context you need to use  the
327       semanage fcontext command.  This will modify the SELinux labeling data‐
328       base.  You will need to use restorecon to apply the labels.
329
330

COMMANDS

332       semanage fcontext can also be used to manipulate default  file  context
333       mappings.
334
335       semanage  permissive  can  also  be used to manipulate whether or not a
336       process type is permissive.
337
338       semanage module can also be used to enable/disable/install/remove  pol‐
339       icy modules.
340
341       semanage boolean can also be used to manipulate the booleans
342
343
344       system-config-selinux is a GUI tool available to customize SELinux pol‐
345       icy settings.
346
347

AUTHOR

349       This manual page was auto-generated using sepolicy manpage .
350
351

SEE ALSO

353       selinux(8),  httpd_suexec(8),  semanage(8),  restorecon(8),   chcon(1),
354       sepolicy(8) , setsebool(8)
355
356
357
358httpd_suexec                       19-04-25            httpd_suexec_selinux(8)
Impressum