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 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 determine whether webadm can manage generic user files,
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 determine whether webadm can read generic user files,
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 deny user domains applications to map a memory region as
72 both executable and writable, this is dangerous and the executable
73 should be reported in bugzilla, you must turn on the deny_execmem bool‐
74 ean. Enabled by default.
75
76 setsebool -P deny_execmem 1
77
78
79
80 If you want to deny any process from ptracing or debugging any other
81 processes, you must turn on the deny_ptrace boolean. Enabled by
82 default.
83
84 setsebool -P deny_ptrace 1
85
86
87
88 If you want to allow all domains to execute in fips_mode, you must turn
89 on the fips_mode boolean. Enabled by default.
90
91 setsebool -P fips_mode 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 selinuxuser_exec‐
99 stack boolean. Enabled by default.
100
101 setsebool -P selinuxuser_execstack 1
102
103
104
106 The SELinux process type webadm_t can manage files labeled with the
107 following file types. The paths listed are the default paths for these
108 file types. Note the processes UID still need to have DAC permissions.
109
110 httpd_config_t
111
112 /etc/httpd(/.*)?
113 /etc/nginx(/.*)?
114 /etc/apache(2)?(/.*)?
115 /etc/cherokee(/.*)?
116 /etc/lighttpd(/.*)?
117 /etc/apache-ssl(2)?(/.*)?
118 /var/lib/openshift/.httpd.d(/.*)?
119 /etc/opt/rh/rh-nginx18/nginx(/.*)?
120 /var/lib/stickshift/.httpd.d(/.*)?
121 /etc/vhosts
122 /etc/thttpd.conf
123
124 httpd_lock_t
125
126
127 httpd_log_t
128
129 /srv/([^/]*/)?www/logs(/.*)?
130 /var/www(/.*)?/logs(/.*)?
131 /var/log/glpi(/.*)?
132 /var/log/cacti(/.*)?
133 /var/log/httpd(/.*)?
134 /var/log/nginx(/.*)?
135 /var/log/apache(2)?(/.*)?
136 /var/log/horizon(/.*)?
137 /var/log/php-fpm(/.*)?
138 /var/log/cherokee(/.*)?
139 /var/log/lighttpd(/.*)?
140 /var/log/suphp.log.*
141 /var/log/thttpd.log.*
142 /var/log/apache-ssl(2)?(/.*)?
143 /var/log/cgiwrap.log.*
144 /var/www/stickshift/[^/]*/log(/.*)?
145 /var/log/graphite-web(/.*)?
146 /var/www/miq/vmdb/log(/.*)?
147 /var/log/roundcubemail(/.*)?
148 /var/log/php_errors.log.*
149 /var/log/dirsrv/admin-serv(/.*)?
150 /var/opt/rh/rh-nginx18/log(/.*)?
151 /var/lib/openshift/.log/httpd(/.*)?
152 /var/www/openshift/console/log(/.*)?
153 /var/www/openshift/broker/httpd/logs(/.*)?
154 /var/www/openshift/console/httpd/logs(/.*)?
155 /etc/httpd/logs
156
157 httpd_modules_t
158
159 /usr/lib/httpd(/.*)?
160 /usr/lib/apache(/.*)?
161 /usr/lib/cherokee(/.*)?
162 /usr/lib/lighttpd(/.*)?
163 /usr/lib/apache2/modules(/.*)?
164 /etc/httpd/modules
165
166 httpd_php_tmp_t
167
168
169 httpd_script_exec_type
170
171
172 httpd_suexec_tmp_t
173
174
175 httpd_tmp_t
176
177 /var/run/user/apache(/.*)?
178 /var/www/openshift/console/tmp(/.*)?
179
180 httpd_unit_file_t
181
182 /usr/lib/systemd/system/httpd.*
183 /usr/lib/systemd/system/nginx.*
184 /usr/lib/systemd/system/thttpd.*
185 /usr/lib/systemd/system/php-fpm.*
186
187 httpd_var_run_t
188
189 /var/run/wsgi.*
190 /var/run/mod_.*
191 /var/run/httpd.*
192 /var/run/nginx.*
193 /var/run/apache.*
194 /var/run/php-fpm(/.*)?
195 /var/run/fcgiwrap(/.*)?
196 /var/run/lighttpd(/.*)?
197 /var/lib/php/session(/.*)?
198 /var/lib/php/wsdlcache(/.*)?
199 /var/run/dirsrv/admin-serv.*
200 /var/opt/rh/rh-nginx18/run/nginx(/.*)?
201 /var/www/openshift/broker/httpd/run(/.*)?
202 /var/www/openshift/console/httpd/run(/.*)?
203 /opt/dirsrv/var/run/dirsrv/dsgw/cookies(/.*)?
204 /var/run/thttpd.pid
205 /var/run/gcache_port
206 /var/run/cherokee.pid
207
208 httpdcontent
209
210
211 public_content_rw_t
212
213 /var/spool/abrt-upload(/.*)?
214
215 systemd_passwd_var_run_t
216
217 /var/run/systemd/ask-password(/.*)?
218 /var/run/systemd/ask-password-block(/.*)?
219
220 user_home_t
221
222 /home/[^/]+/.+
223
224 user_tmp_t
225
226 /dev/shm/mono.*
227 /var/run/user(/.*)?
228 /tmp/.ICE-unix(/.*)?
229 /tmp/.X11-unix(/.*)?
230 /dev/shm/pulse-shm.*
231 /tmp/.X0-lock
232 /tmp/hsperfdata_root
233 /var/tmp/hsperfdata_root
234 /home/[^/]+/tmp
235 /home/[^/]+/.tmp
236 /tmp/gconfd-[^/]+
237
238 webadm_tmp_t
239
240
241
243 semanage fcontext can also be used to manipulate default file context
244 mappings.
245
246 semanage permissive can also be used to manipulate whether or not a
247 process type is permissive.
248
249 semanage module can also be used to enable/disable/install/remove pol‐
250 icy modules.
251
252 semanage boolean can also be used to manipulate the booleans
253
254
255 system-config-selinux is a GUI tool available to customize SELinux pol‐
256 icy settings.
257
258
260 This manual page was auto-generated using sepolicy manpage .
261
262
264 selinux(8), webadm(8), semanage(8), restorecon(8), chcon(1), sepol‐
265 icy(8), setsebool(8)
266
267
268
269mgrepl@redhat.com webadm webadm_selinux(8)