1logrotate_selinux(8) SELinux Policy logrotate logrotate_selinux(8)
2
3
4
6 logrotate_selinux - Security Enhanced Linux Policy for the logrotate
7 processes
8
10 Security-Enhanced Linux secures the logrotate processes via flexible
11 mandatory access control.
12
13 The logrotate processes execute with the logrotate_t SELinux type. You
14 can check if you have these processes running by executing the ps com‐
15 mand with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep logrotate_t
20
21
22
24 The logrotate_t SELinux type can be entered via the logrotate_exec_t
25 file type.
26
27 The default entrypoint paths for the logrotate_t domain are the follow‐
28 ing:
29
30 /etc/cron.(daily|weekly)/sysklogd, /usr/sbin/logrotate
31
33 SELinux defines process types (domains) for each process running on the
34 system
35
36 You can see the context of a process using the -Z option to ps
37
38 Policy governs the access confined processes have to files. SELinux
39 logrotate policy is very flexible allowing users to setup their logro‐
40 tate processes in as secure a method as possible.
41
42 The following process types are defined for logrotate:
43
44 logrotate_t, logrotate_mail_t
45
46 Note: semanage permissive -a logrotate_t can be used to make the
47 process type logrotate_t permissive. SELinux does not deny access to
48 permissive process types, but the AVC (SELinux denials) messages are
49 still generated.
50
51
53 SELinux policy is customizable based on least access required. logro‐
54 tate policy is extremely flexible and has several booleans that allow
55 you to manipulate the policy and run logrotate with the tightest access
56 possible.
57
58
59
60 If you want to allow logrotate to read logs inside, you must turn on
61 the logrotate_read_inside_containers boolean. Disabled by default.
62
63 setsebool -P logrotate_read_inside_containers 1
64
65
66
67 If you want to allow logrotate to manage cifs files, you must turn on
68 the logrotate_use_cifs boolean. Disabled by default.
69
70 setsebool -P logrotate_use_cifs 1
71
72
73
74 If you want to allow logrotate domain to manage fuse files, you must
75 turn on the logrotate_use_fusefs boolean. Disabled by default.
76
77 setsebool -P logrotate_use_fusefs 1
78
79
80
81 If you want to allow logrotate to manage nfs files, you must turn on
82 the logrotate_use_nfs boolean. Disabled by default.
83
84 setsebool -P logrotate_use_nfs 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 system to run with NIS, you must turn on the
96 nis_enabled boolean. Disabled by default.
97
98 setsebool -P nis_enabled 1
99
100
101
102 If you want to support NFS home directories, you must turn on the
103 use_nfs_home_dirs boolean. Disabled by default.
104
105 setsebool -P use_nfs_home_dirs 1
106
107
108
109 If you want to support SAMBA home directories, you must turn on the
110 use_samba_home_dirs boolean. Disabled by default.
111
112 setsebool -P use_samba_home_dirs 1
113
114
115
117 The SELinux process type logrotate_t can manage files labeled with the
118 following file types. The paths listed are the default paths for these
119 file types. Note the processes UID still need to have DAC permissions.
120
121 abrt_var_cache_t
122
123 /var/tmp/abrt(/.*)?
124 /var/cache/abrt(/.*)?
125 /var/spool/abrt(/.*)?
126 /var/spool/debug(/.*)?
127 /var/cache/abrt-di(/.*)?
128 /var/spool/rhsm/debug(/.*)?
129
130 cifs_t
131
132
133 cluster_conf_t
134
135 /etc/cluster(/.*)?
136
137 cluster_var_lib_t
138
139 /var/lib/pcsd(/.*)?
140 /var/lib/cluster(/.*)?
141 /var/lib/openais(/.*)?
142 /var/lib/pengine(/.*)?
143 /var/lib/corosync(/.*)?
144 /usr/lib/heartbeat(/.*)?
145 /var/lib/heartbeat(/.*)?
146 /var/lib/pacemaker(/.*)?
147
148 cluster_var_run_t
149
150 /var/run/crm(/.*)?
151 /var/run/cman_.*
152 /var/run/rsctmp(/.*)?
153 /var/run/aisexec.*
154 /var/run/heartbeat(/.*)?
155 /var/run/pcsd-ruby.socket
156 /var/run/corosync-qnetd(/.*)?
157 /var/run/corosync-qdevice(/.*)?
158 /var/run/corosync.pid
159 /var/run/cpglockd.pid
160 /var/run/rgmanager.pid
161 /var/run/cluster/rgmanager.sk
162
163 collectd_rw_content_t
164
165
166 fusefs_t
167
168 /var/run/user/[0-9]+/gvfs
169
170 krb5_host_rcache_t
171
172 /var/tmp/krb5_0.rcache2
173 /var/cache/krb5rcache(/.*)?
174 /var/tmp/nfs_0
175 /var/tmp/DNS_25
176 /var/tmp/host_0
177 /var/tmp/imap_0
178 /var/tmp/HTTP_23
179 /var/tmp/HTTP_48
180 /var/tmp/ldap_55
181 /var/tmp/ldap_487
182 /var/tmp/ldapmap1_0
183
184 logfile
185
186 all log files
187
188 logrotate_lock_t
189
190
191 logrotate_tmp_t
192
193
194 logrotate_var_lib_t
195
196 /var/lib/logrotate(/.*)?
197 /var/lib/logrotate.status.*
198
199 named_cache_t
200
201 /var/named/data(/.*)?
202 /var/lib/softhsm(/.*)?
203 /var/lib/unbound(/.*)?
204 /var/named/slaves(/.*)?
205 /var/named/dynamic(/.*)?
206 /var/named/chroot/var/tmp(/.*)?
207 /var/named/chroot/var/named/data(/.*)?
208 /var/named/chroot/var/named/slaves(/.*)?
209 /var/named/chroot/var/named/dynamic(/.*)?
210
211 nfs_t
212
213
214 openshift_var_lib_t
215
216 /var/lib/openshift(/.*)?
217 /var/lib/stickshift(/.*)?
218 /var/lib/containers/home(/.*)?
219
220 root_t
221
222 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
223 /
224 /initrd
225
226 var_spool_t
227
228 /var/spool(/.*)?
229
230 virt_cache_t
231
232 /var/cache/oz(/.*)?
233 /var/cache/libvirt(/.*)?
234
235
237 SELinux requires files to have an extended attribute to define the file
238 type.
239
240 You can see the context of a file using the -Z option to ls
241
242 Policy governs the access confined processes have to these files.
243 SELinux logrotate policy is very flexible allowing users to setup their
244 logrotate processes in as secure a method as possible.
245
246 EQUIVALENCE DIRECTORIES
247
248
249 logrotate policy stores data with multiple different file context types
250 under the /var/lib/logrotate directory. If you would like to store the
251 data in a different directory you can use the semanage command to cre‐
252 ate an equivalence mapping. If you wanted to store this data under the
253 /srv directory you would execute the following command:
254
255 semanage fcontext -a -e /var/lib/logrotate /srv/logrotate
256 restorecon -R -v /srv/logrotate
257
258 STANDARD FILE CONTEXT
259
260 SELinux defines the file context types for the logrotate, if you wanted
261 to store files with these types in a diffent paths, you need to execute
262 the semanage command to specify alternate labeling and then use re‐
263 storecon to put the labels on disk.
264
265 semanage fcontext -a -t logrotate_mail_tmp_t '/srv/mylogrotate_con‐
266 tent(/.*)?'
267 restorecon -R -v /srv/mylogrotate_content
268
269 Note: SELinux often uses regular expressions to specify labels that
270 match multiple files.
271
272 The following file types are defined for logrotate:
273
274
275
276 logrotate_exec_t
277
278 - Set files with the logrotate_exec_t type, if you want to transition
279 an executable to the logrotate_t domain.
280
281
282 Paths:
283 /etc/cron.(daily|weekly)/sysklogd, /usr/sbin/logrotate
284
285
286 logrotate_lock_t
287
288 - Set files with the logrotate_lock_t type, if you want to treat the
289 files as logrotate lock data, stored under the /var/lock directory
290
291
292
293 logrotate_mail_tmp_t
294
295 - Set files with the logrotate_mail_tmp_t type, if you want to store
296 logrotate mail temporary files in the /tmp directories.
297
298
299
300 logrotate_tmp_t
301
302 - Set files with the logrotate_tmp_t type, if you want to store logro‐
303 tate temporary files in the /tmp directories.
304
305
306
307 logrotate_var_lib_t
308
309 - Set files with the logrotate_var_lib_t type, if you want to store the
310 logrotate files under the /var/lib directory.
311
312
313 Paths:
314 /var/lib/logrotate(/.*)?, /var/lib/logrotate.status.*
315
316
317 Note: File context can be temporarily modified with the chcon command.
318 If you want to permanently change the file context you need to use the
319 semanage fcontext command. This will modify the SELinux labeling data‐
320 base. You will need to use restorecon to apply the labels.
321
322
324 semanage fcontext can also be used to manipulate default file context
325 mappings.
326
327 semanage permissive can also be used to manipulate whether or not a
328 process type is permissive.
329
330 semanage module can also be used to enable/disable/install/remove pol‐
331 icy modules.
332
333 semanage boolean can also be used to manipulate the booleans
334
335
336 system-config-selinux is a GUI tool available to customize SELinux pol‐
337 icy settings.
338
339
341 This manual page was auto-generated using sepolicy manpage .
342
343
345 selinux(8), logrotate(8), semanage(8), restorecon(8), chcon(1), sepol‐
346 icy(8), setsebool(8), logrotate_mail_selinux(8), logro‐
347 tate_mail_selinux(8)
348
349
350
351logrotate 22-05-27 logrotate_selinux(8)