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 de‐
57 fault.
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 de‐
65 fault.
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 de‐
82 fault.
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
156 httpd_modules_t
157
158 /usr/lib/httpd(/.*)?
159 /usr/lib/apache(/.*)?
160 /usr/lib/cherokee(/.*)?
161 /usr/lib/lighttpd(/.*)?
162 /usr/lib/apache2/modules(/.*)?
163
164 httpd_php_tmp_t
165
166
167 httpd_script_exec_type
168
169
170 httpd_suexec_tmp_t
171
172
173 httpd_tmp_t
174
175 /var/run/user/apache(/.*)?
176 /var/www/openshift/console/tmp(/.*)?
177
178 httpd_unit_file_t
179
180 /usr/lib/systemd/system/httpd.*
181 /usr/lib/systemd/system/nginx.*
182 /usr/lib/systemd/system/thttpd.*
183 /usr/lib/systemd/system/php-fpm.*
184
185 httpd_var_run_t
186
187 /var/run/wsgi.*
188 /var/run/mod_.*
189 /var/run/httpd.*
190 /var/run/nginx.*
191 /var/run/apache.*
192 /var/run/php-fpm(/.*)?
193 /var/run/fcgiwrap(/.*)?
194 /var/run/lighttpd(/.*)?
195 /var/lib/php/session(/.*)?
196 /var/lib/php/wsdlcache(/.*)?
197 /var/run/dirsrv/admin-serv.*
198 /var/opt/rh/rh-nginx18/run/nginx(/.*)?
199 /var/www/openshift/broker/httpd/run(/.*)?
200 /var/www/openshift/console/httpd/run(/.*)?
201 /opt/dirsrv/var/run/dirsrv/dsgw/cookies(/.*)?
202 /var/run/thttpd.pid
203 /var/run/gcache_port
204 /var/run/cherokee.pid
205
206 httpdcontent
207
208
209 systemd_passwd_var_run_t
210
211 /var/run/systemd/ask-password(/.*)?
212 /var/run/systemd/ask-password-block(/.*)?
213
214 user_home_t
215
216 /home/[^/]+/.+
217
218 webadm_tmp_t
219
220
221
223 semanage fcontext can also be used to manipulate default file context
224 mappings.
225
226 semanage permissive can also be used to manipulate whether or not a
227 process type is permissive.
228
229 semanage module can also be used to enable/disable/install/remove pol‐
230 icy modules.
231
232 semanage boolean can also be used to manipulate the booleans
233
234
235 system-config-selinux is a GUI tool available to customize SELinux pol‐
236 icy settings.
237
238
240 This manual page was auto-generated using sepolicy manpage .
241
242
244 selinux(8), webadm(8), semanage(8), restorecon(8), chcon(1), sepol‐
245 icy(8), setsebool(8)
246
247
248
249mgrepl@redhat.com webadm webadm_selinux(8)