1gpg_web_selinux(8) SELinux Policy gpg_web gpg_web_selinux(8)
2
3
4
6 gpg_web_selinux - Security Enhanced Linux Policy for the gpg_web pro‐
7 cesses
8
10 Security-Enhanced Linux secures the gpg_web processes via flexible
11 mandatory access control.
12
13 The gpg_web processes execute with the gpg_web_t SELinux type. You can
14 check if you have these processes running by executing the ps command
15 with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep gpg_web_t
20
21
22
24 The gpg_web_t SELinux type can be entered via the gpg_exec_t file type.
25
26 The default entrypoint paths for the gpg_web_t domain are the follow‐
27 ing:
28
29 /usr/bin/gpg(2)?, /usr/lib/gnupg/.*, /usr/bin/gpgsm
30
32 SELinux defines process types (domains) for each process running on the
33 system
34
35 You can see the context of a process using the -Z option to ps
36
37 Policy governs the access confined processes have to files. SELinux
38 gpg_web policy is very flexible allowing users to setup their gpg_web
39 processes in as secure a method as possible.
40
41 The following process types are defined for gpg_web:
42
43 gpg_web_t
44
45 Note: semanage permissive -a gpg_web_t can be used to make the process
46 type gpg_web_t permissive. SELinux does not deny access to permissive
47 process types, but the AVC (SELinux denials) messages are still gener‐
48 ated.
49
50
52 SELinux policy is customizable based on least access required. gpg_web
53 policy is extremely flexible and has several booleans that allow you to
54 manipulate the policy and run gpg_web with the tightest access possi‐
55 ble.
56
57
58
59 If you want to deny any process from ptracing or debugging any other
60 processes, you must turn on the deny_ptrace boolean. Enabled by
61 default.
62
63 setsebool -P deny_ptrace 1
64
65
66
67 If you want to allow any process to mmap any file on system with
68 attribute file_type, you must turn on the domain_can_mmap_files bool‐
69 ean. Enabled by default.
70
71 setsebool -P domain_can_mmap_files 1
72
73
74
75 If you want to allow all domains write to kmsg_device, while kernel is
76 executed with systemd.log_target=kmsg parameter, you must turn on the
77 domain_can_write_kmsg boolean. Disabled by default.
78
79 setsebool -P domain_can_write_kmsg 1
80
81
82
83 If you want to allow all domains to use other domains file descriptors,
84 you must turn on the domain_fd_use boolean. Enabled by default.
85
86 setsebool -P domain_fd_use 1
87
88
89
90 If you want to allow all domains to have the kernel load modules, you
91 must turn on the domain_kernel_load_modules boolean. Disabled by
92 default.
93
94 setsebool -P domain_kernel_load_modules 1
95
96
97
98 If you want to allow all domains to execute in fips_mode, you must turn
99 on the fips_mode boolean. Enabled by default.
100
101 setsebool -P fips_mode 1
102
103
104
105 If you want to enable reading of urandom for all domains, you must turn
106 on the global_ssp boolean. Disabled by default.
107
108 setsebool -P global_ssp 1
109
110
111
112 If you want to allow httpd cgi support, you must turn on the
113 httpd_enable_cgi boolean. Disabled by default.
114
115 setsebool -P httpd_enable_cgi 1
116
117
118
119 If you want to allow httpd to run gpg, you must turn on the
120 httpd_use_gpg boolean. Disabled by default.
121
122 setsebool -P httpd_use_gpg 1
123
124
125
127 The SELinux process type gpg_web_t can manage files labeled with the
128 following file types. The paths listed are the default paths for these
129 file types. Note the processes UID still need to have DAC permissions.
130
131 httpd_sys_rw_content_t
132
133 /etc/glpi(/.*)?
134 /etc/horde(/.*)?
135 /etc/drupal.*
136 /etc/z-push(/.*)?
137 /var/lib/svn(/.*)?
138 /var/www/svn(/.*)?
139 /etc/owncloud(/.*)?
140 /var/www/html(/.*)?/uploads(/.*)?
141 /var/www/html(/.*)?/wp-content(/.*)?
142 /var/www/html(/.*)?/wp_backups(/.*)?
143 /var/www/html(/.*)?/sites/default/files(/.*)?
144 /var/www/html(/.*)?/sites/default/settings.php
145 /etc/nextcloud(/.*)?
146 /etc/mock/koji(/.*)?
147 /var/lib/drupal.*
148 /etc/zabbix/web(/.*)?
149 /var/lib/moodle(/.*)?
150 /var/log/z-push(/.*)?
151 /var/spool/gosa(/.*)?
152 /etc/WebCalendar(/.*)?
153 /usr/share/joomla(/.*)?
154 /var/lib/dokuwiki(/.*)?
155 /var/lib/owncloud(/.*)?
156 /var/spool/viewvc(/.*)?
157 /var/lib/nextcloud(/.*)?
158 /var/lib/pootle/po(/.*)?
159 /var/www/moodledata(/.*)?
160 /srv/gallery2/smarty(/.*)?
161 /var/www/moodle/data(/.*)?
162 /var/lib/graphite-web(/.*)?
163 /var/log/shibboleth-www(/.*)?
164 /var/www/gallery/albums(/.*)?
165 /var/www/html/owncloud/data(/.*)?
166 /var/www/html/nextcloud/data(/.*)?
167 /usr/share/wordpress-mu/wp-content(/.*)?
168 /usr/share/wordpress/wp-content/uploads(/.*)?
169 /usr/share/wordpress/wp-content/upgrade(/.*)?
170 /var/www/html/configuration.php
171
172 public_content_rw_t
173
174 /var/spool/abrt-upload(/.*)?
175
176
178 If you want to share files with multiple domains (Apache, FTP, rsync,
179 Samba), you can set a file context of public_content_t and public_con‐
180 tent_rw_t. These context allow any of the above domains to read the
181 content. If you want a particular domain to write to the public_con‐
182 tent_rw_t domain, you must set the appropriate boolean.
183
184 Allow gpg_web servers to read the /var/gpg_web directory by adding the
185 public_content_t file type to the directory and by restoring the file
186 type.
187
188 semanage fcontext -a -t public_content_t "/var/gpg_web(/.*)?"
189 restorecon -F -R -v /var/gpg_web
190
191 Allow gpg_web servers to read and write /var/gpg_web/incoming by adding
192 the public_content_rw_t type to the directory and by restoring the file
193 type. You also need to turn on the gpg_web_anon_write boolean.
194
195 semanage fcontext -a -t public_content_rw_t "/var/gpg_web/incom‐
196 ing(/.*)?"
197 restorecon -F -R -v /var/gpg_web/incoming
198 setsebool -P gpg_web_anon_write 1
199
200
201 If you want to allow gpg web domain to modify public files used for
202 public file transfer services., you must turn on the gpg_web_anon_write
203 boolean.
204
205 setsebool -P gpg_web_anon_write 1
206
207
209 semanage fcontext can also be used to manipulate default file context
210 mappings.
211
212 semanage permissive can also be used to manipulate whether or not a
213 process type is permissive.
214
215 semanage module can also be used to enable/disable/install/remove pol‐
216 icy modules.
217
218 semanage boolean can also be used to manipulate the booleans
219
220
221 system-config-selinux is a GUI tool available to customize SELinux pol‐
222 icy settings.
223
224
226 This manual page was auto-generated using sepolicy manpage .
227
228
230 selinux(8), gpg_web(8), semanage(8), restorecon(8), chcon(1), sepol‐
231 icy(8) , setsebool(8)
232
233
234
235gpg_web 19-04-25 gpg_web_selinux(8)