1webadm_selinux(8) webadm SELinux Policy documentation webadm_selinux(8)
2
3
4
6 webadm_r - Web administrator role - Security Enhanced Linux Policy
7
8
10 SELinux supports Roles Based Access Control (RBAC), some Linux roles
11 are login roles, while other roles need to be transition into.
12
13 Note: Examples in this man page will use the staff_u SELinux user.
14
15 Non login roles are usually used for administrative tasks. For example,
16 tasks that require root privileges. Roles control which types a user
17 can run processes with. Roles often have default types assigned to
18 them.
19
20 The default type for the webadm_r role is webadm_t.
21
22 The newrole program to transition directly to this role.
23
24 newrole -r webadm_r -t webadm_t
25
26 sudo is the preferred method to do transition from one role to another.
27 You setup sudo to transition to webadm_r by adding a similar line to
28 the /etc/sudoers file.
29
30 USERNAME ALL=(ALL) ROLE=webadm_r TYPE=webadm_t COMMAND
31
32 sudo will run COMMAND as staff_u:webadm_r:webadm_t:LEVEL
33
34 When using a a non login role, you need to setup SELinux so that your
35 SELinux user can reach webadm_r role.
36
37 Execute the following to see all of the assigned SELinux roles:
38
39 semanage user -l
40
41 You need to add webadm_r to the staff_u user. You could setup the
42 staff_u user to be able to use the webadm_r role with a command like:
43
44 $ semanage user -m -R 'staff_r system_r webadm_r' staff_u
45
46
47
49 SELinux policy is customizable based on least access required. webadm
50 policy is extremely flexible and has several booleans that allow you to
51 manipulate the policy and run webadm with the tightest access possible.
52
53
54
55 If you want to allow webadm to manage files in users home directories,
56 you must turn on the webadm_manage_user_files boolean. Disabled by
57 default.
58
59 setsebool -P webadm_manage_user_files 1
60
61
62
63 If you want to allow webadm to read files in users home directories,
64 you must turn on the webadm_read_user_files boolean. Disabled by
65 default.
66
67 setsebool -P webadm_read_user_files 1
68
69
70
71 If you want to allow direct login to the console device. Required for
72 System 390, you must turn on the allow_console_login boolean. Enabled
73 by default.
74
75 setsebool -P allow_console_login 1
76
77
78
79 If you want to allow all domains to use other domains file descriptors,
80 you must turn on the allow_domain_fd_use boolean. Enabled by default.
81
82 setsebool -P allow_domain_fd_use 1
83
84
85
86 If you want to allow unconfined executables to map a memory region as
87 both executable and writable, this is dangerous and the executable
88 should be reported in bugzilla), you must turn on the allow_execmem
89 boolean. Enabled by default.
90
91 setsebool -P allow_execmem 1
92
93
94
95 If you want to allow unconfined executables to make their stack exe‐
96 cutable. This should never, ever be necessary. Probably indicates a
97 badly coded executable, but could indicate an attack. This executable
98 should be reported in bugzilla), you must turn on the allow_execstack
99 boolean. Enabled by default.
100
101 setsebool -P allow_execstack 1
102
103
104
105 If you want to allow confined applications to run with kerberos, you
106 must turn on the allow_kerberos boolean. Enabled by default.
107
108 setsebool -P allow_kerberos 1
109
110
111
112 If you want to allow sysadm to debug or ptrace all processes, you must
113 turn on the allow_ptrace boolean. Disabled by default.
114
115 setsebool -P allow_ptrace 1
116
117
118
119 If you want to allow system to run with NIS, you must turn on the
120 allow_ypbind boolean. Disabled by default.
121
122 setsebool -P allow_ypbind 1
123
124
125
126 If you want to allow all domains to have the kernel load modules, you
127 must turn on the domain_kernel_load_modules boolean. Disabled by
128 default.
129
130 setsebool -P domain_kernel_load_modules 1
131
132
133
134 If you want to allow all domains to execute in fips_mode, you must turn
135 on the fips_mode boolean. Enabled by default.
136
137 setsebool -P fips_mode 1
138
139
140
141 If you want to enable reading of urandom for all domains, you must turn
142 on the global_ssp boolean. Disabled by default.
143
144 setsebool -P global_ssp 1
145
146
147
148 If you want to allow confined applications to use nscd shared memory,
149 you must turn on the nscd_use_shm boolean. Enabled by default.
150
151 setsebool -P nscd_use_shm 1
152
153
154
155 If you want to enabling secure mode disallows programs, such as new‐
156 role, from transitioning to administrative user domains, you must turn
157 on the secure_mode boolean. Disabled by default.
158
159 setsebool -P secure_mode 1
160
161
162
163 If you want to allow ssh logins as sysadm_r:sysadm_t, you must turn on
164 the ssh_sysadm_login boolean. Disabled by default.
165
166 setsebool -P ssh_sysadm_login 1
167
168
169
170 If you want to allow xdm logins as sysadm, you must turn on the
171 xdm_sysadm_login boolean. Disabled by default.
172
173 setsebool -P xdm_sysadm_login 1
174
175
176
178 The SELinux process type webadm_t can manage files labeled with the
179 following file types. The paths listed are the default paths for these
180 file types. Note the processes UID still need to have DAC permissions.
181
182 httpd_config_t
183
184 /etc/httpd(/.*)?
185 /etc/nginx(/.*)?
186 /etc/apache(2)?(/.*)?
187 /etc/cherokee(/.*)?
188 /etc/lighttpd(/.*)?
189 /etc/apache-ssl(2)?(/.*)?
190 /var/lib/openshift/.httpd.d(/.*)?
191 /var/lib/stickshift/.httpd.d(/.*)?
192 /etc/vhosts
193 /etc/thttpd.conf
194
195 httpd_lock_t
196
197
198 httpd_log_t
199
200 /var/log/cacti(/.*)?
201 /var/log/httpd(/.*)?
202 /var/log/nginx(/.*)?
203 /var/log/apache(2)?(/.*)?
204 /var/log/php-fpm(/.*)?
205 /var/log/cherokee(/.*)?
206 /var/log/lighttpd(/.*)?
207 /var/log/thttpd.log.*
208 /var/log/apache-ssl(2)?(/.*)?
209 /var/log/cgiwrap.log.*
210 /var/www/stickshift/[^/]*/log(/.*)?
211 /var/log/roundcubemail(/.*)?
212 /var/lib/openshift/.log/httpd(/.*)?
213 /var/www/openshift/console/log(/.*)?
214 /etc/httpd/logs
215
216 httpd_modules_t
217
218 /usr/lib(64)?/httpd(/.*)?
219 /usr/lib(64)?/apache(/.*)?
220 /usr/lib(64)?/cherokee(/.*)?
221 /usr/lib(64)?/lighttpd(/.*)?
222 /usr/lib(64)?/apache2/modules(/.*)?
223 /etc/httpd/modules
224
225 httpd_php_tmp_t
226
227
228 httpd_script_exec_type
229
230
231 httpd_suexec_tmp_t
232
233
234 httpd_tmp_t
235
236 /var/www/openshift/console/tmp(/.*)?
237
238 httpd_var_run_t
239
240 /var/run/mod_.*
241 /var/run/wsgi.*
242 /var/run/httpd.*
243 /var/run/nginx.*
244 /var/run/apache.*
245 /var/run/php-fpm(/.*)?
246 /var/run/lighttpd(/.*)?
247 /var/lib/php/session(/.*)?
248 /var/run/thttpd.pid
249 /var/run/gcache_port
250
251 httpdcontent
252
253
254 initrc_tmp_t
255
256
257 mnt_t
258
259 /mnt(/[^/]*)
260 /mnt(/[^/]*)?
261 /rhev(/[^/]*)?
262 /media(/[^/]*)
263 /media(/[^/]*)?
264 /etc/rhgb(/.*)?
265 /media/.hal-.*
266 /net
267 /afs
268 /rhev
269 /misc
270
271 public_content_rw_t
272
273 /var/spool/abrt-upload(/.*)?
274
275 tmp_t
276
277 /tmp
278 /usr/tmp
279 /var/tmp
280 /tmp-inst
281 /var/tmp-inst
282 /var/tmp/vi.recover
283
284 user_home_t
285
286 /home/[^/]*/.+
287 /home/staff/.+
288
289 user_tmp_t
290
291 /tmp/gconfd-.*
292 /tmp/gconfd-staff
293
294 var_lock_t
295
296 /var/lock(/.*)?
297
298
300 semanage fcontext can also be used to manipulate default file context
301 mappings.
302
303 semanage permissive can also be used to manipulate whether or not a
304 process type is permissive.
305
306 semanage module can also be used to enable/disable/install/remove pol‐
307 icy modules.
308
309 semanage boolean can also be used to manipulate the booleans
310
311
312 system-config-selinux is a GUI tool available to customize SELinux pol‐
313 icy settings.
314
315
317 This manual page was auto-generated using sepolicy manpage .
318
319
321 selinux(8), webadm(8), semanage(8), restorecon(8), chcon(1) , setse‐
322 bool(8)
323
324
325
326mgrepl@redhat.com webadm webadm_selinux(8)