1rsync_selinux(8)             SELinux Policy rsync             rsync_selinux(8)
2
3
4

NAME

6       rsync_selinux - Security Enhanced Linux Policy for the rsync processes
7

DESCRIPTION

9       Security-Enhanced Linux secures the rsync processes via flexible manda‐
10       tory access control.
11
12       The rsync processes execute with the  rsync_t  SELinux  type.  You  can
13       check  if  you have these processes running by executing the ps command
14       with the -Z qualifier.
15
16       For example:
17
18       ps -eZ | grep rsync_t
19
20
21

ENTRYPOINTS

23       The rsync_t SELinux type can be entered via the rsync_exec_t file type.
24
25       The default entrypoint paths for the rsync_t domain are the following:
26
27       /usr/bin/rsync
28

PROCESS TYPES

30       SELinux defines process types (domains) for each process running on the
31       system
32
33       You can see the context of a process using the -Z option to ps
34
35       Policy  governs  the  access confined processes have to files.  SELinux
36       rsync policy is very flexible allowing users to setup their rsync  pro‐
37       cesses in as secure a method as possible.
38
39       The following process types are defined for rsync:
40
41       rsync_t
42
43       Note:  semanage  permissive  -a rsync_t can be used to make the process
44       type rsync_t permissive. SELinux does not  deny  access  to  permissive
45       process  types, but the AVC (SELinux denials) messages are still gener‐
46       ated.
47
48

BOOLEANS

50       SELinux policy is customizable based on least access  required.   rsync
51       policy is extremely flexible and has several booleans that allow you to
52       manipulate the policy and run rsync with the tightest access possible.
53
54
55
56       If you want to allow rsync to run as a client, you  must  turn  on  the
57       rsync_client boolean. Disabled by default.
58
59       setsebool -P rsync_client 1
60
61
62
63       If  you  want to allow rsync to export any files/directories read only,
64       you must turn on the rsync_export_all_ro boolean. Disabled by default.
65
66       setsebool -P rsync_export_all_ro 1
67
68
69
70       If you want to allow rsync server to manage  all  files/directories  on
71       the system, you must turn on the rsync_full_access boolean. Disabled by
72       default.
73
74       setsebool -P rsync_full_access 1
75
76
77
78       If you want to allow rsync sys_admin capability. This capability is re‐
79       quired to restore files with extended attributes in the "trusted" name‐
80       space, you must turn on the rsync_sys_admin boolean.  Disabled  by  de‐
81       fault.
82
83       setsebool -P rsync_sys_admin 1
84
85
86
87       If  you  want  to  dontaudit all daemons scheduling requests (setsched,
88       sys_nice), you must turn on the  daemons_dontaudit_scheduling  boolean.
89       Enabled by default.
90
91       setsebool -P daemons_dontaudit_scheduling 1
92
93
94
95       If you want to allow all domains to execute in fips_mode, you must turn
96       on the fips_mode boolean. Enabled by default.
97
98       setsebool -P fips_mode 1
99
100
101
102       If you want to allow system to run with  NIS,  you  must  turn  on  the
103       nis_enabled boolean. Disabled by default.
104
105       setsebool -P nis_enabled 1
106
107
108

PORT TYPES

110       SELinux defines port types to represent TCP and UDP ports.
111
112       You  can  see  the  types associated with a port by using the following
113       command:
114
115       semanage port -l
116
117
118       Policy governs the access  confined  processes  have  to  these  ports.
119       SELinux  rsync  policy  is  very flexible allowing users to setup their
120       rsync processes in as secure a method as possible.
121
122       The following port types are defined for rsync:
123
124
125       rsync_port_t
126
127
128
129       Default Defined Ports:
130                 tcp 873
131                 udp 873
132

MANAGED FILES

134       The SELinux process type rsync_t can manage files labeled with the fol‐
135       lowing  file  types.   The paths listed are the default paths for these
136       file types.  Note the processes UID still need to have DAC permissions.
137
138       cifs_t
139
140
141       cluster_conf_t
142
143            /etc/cluster(/.*)?
144
145       cluster_var_lib_t
146
147            /var/lib/pcsd(/.*)?
148            /var/lib/cluster(/.*)?
149            /var/lib/openais(/.*)?
150            /var/lib/pengine(/.*)?
151            /var/lib/corosync(/.*)?
152            /usr/lib/heartbeat(/.*)?
153            /var/lib/heartbeat(/.*)?
154            /var/lib/pacemaker(/.*)?
155
156       cluster_var_run_t
157
158            /var/run/crm(/.*)?
159            /var/run/cman_.*
160            /var/run/rsctmp(/.*)?
161            /var/run/aisexec.*
162            /var/run/heartbeat(/.*)?
163            /var/run/pcsd-ruby.socket
164            /var/run/corosync-qnetd(/.*)?
165            /var/run/corosync-qdevice(/.*)?
166            /var/run/corosync.pid
167            /var/run/cpglockd.pid
168            /var/run/rgmanager.pid
169            /var/run/cluster/rgmanager.sk
170
171       ecryptfs_t
172
173            /home/[^/]+/.Private(/.*)?
174            /home/[^/]+/.ecryptfs(/.*)?
175
176       fusefs_t
177
178            /var/run/user/[0-9]+/gvfs
179
180       krb5_host_rcache_t
181
182            /var/tmp/krb5_0.rcache2
183            /var/cache/krb5rcache(/.*)?
184            /var/tmp/nfs_0
185            /var/tmp/DNS_25
186            /var/tmp/host_0
187            /var/tmp/imap_0
188            /var/tmp/HTTP_23
189            /var/tmp/HTTP_48
190            /var/tmp/ldap_55
191            /var/tmp/ldap_487
192            /var/tmp/ldapmap1_0
193
194       nfs_t
195
196
197       non_auth_file_type
198
199
200       root_t
201
202            /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
203            /
204            /initrd
205
206       rsync_log_t
207
208            /var/log/rsync.*
209
210       rsync_tmp_t
211
212
213       rsync_var_run_t
214
215            /var/run/rsyncd.lock
216            /var/run/swift_server.lock
217
218       swift_data_t
219
220            /srv/node(/.*)?
221            /var/lib/swift(/.*)?
222            /srv/loopback-device(/.*)?
223
224       swift_lock_t
225
226            /var/lock/swift.*
227
228

FILE CONTEXTS

230       SELinux requires files to have an extended attribute to define the file
231       type.
232
233       You can see the context of a file using the -Z option to ls
234
235       Policy  governs  the  access  confined  processes  have to these files.
236       SELinux rsync policy is very flexible allowing  users  to  setup  their
237       rsync processes in as secure a method as possible.
238
239       STANDARD FILE CONTEXT
240
241       SELinux  defines the file context types for the rsync, if you wanted to
242       store files with these types in a different paths, you need to  execute
243       the  semanage  command  to  specify alternate labeling and then use re‐
244       storecon to put the labels on disk.
245
246       semanage fcontext -a -t rsync_exec_t '/srv/rsync/content(/.*)?'
247       restorecon -R -v /srv/myrsync_content
248
249       Note: SELinux often uses regular expressions  to  specify  labels  that
250       match multiple files.
251
252       The following file types are defined for rsync:
253
254
255
256       rsync_data_t
257
258       -  Set files with the rsync_data_t type, if you want to treat the files
259       as rsync content.
260
261
262
263       rsync_etc_t
264
265       - Set files with the rsync_etc_t type, if you want to store rsync files
266       in the /etc directories.
267
268
269
270       rsync_exec_t
271
272       -  Set  files  with the rsync_exec_t type, if you want to transition an
273       executable to the rsync_t domain.
274
275
276
277       rsync_log_t
278
279       - Set files with the rsync_log_t type, if you want to treat the data as
280       rsync log data, usually stored under the /var/log directory.
281
282
283
284       rsync_tmp_t
285
286       -  Set files with the rsync_tmp_t type, if you want to store rsync tem‐
287       porary files in the /tmp directories.
288
289
290
291       rsync_var_run_t
292
293       - Set files with the rsync_var_run_t type, if you  want  to  store  the
294       rsync files under the /run or /var/run directory.
295
296
297       Paths:
298            /var/run/rsyncd.lock, /var/run/swift_server.lock
299
300
301       Note:  File context can be temporarily modified with the chcon command.
302       If you want to permanently change the file context you need to use  the
303       semanage fcontext command.  This will modify the SELinux labeling data‐
304       base.  You will need to use restorecon to apply the labels.
305
306

SHARING FILES

308       If you want to share files with multiple domains (Apache,  FTP,  rsync,
309       Samba),  you can set a file context of public_content_t and public_con‐
310       tent_rw_t.  These context allow any of the above domains  to  read  the
311       content.   If  you want a particular domain to write to the public_con‐
312       tent_rw_t domain, you must set the appropriate boolean.
313
314       Allow rsync servers to read the /var/rsync directory by adding the pub‐
315       lic_content_t  file  type  to  the  directory and by restoring the file
316       type.
317
318       semanage fcontext -a -t public_content_t "/var/rsync(/.*)?"
319       restorecon -F -R -v /var/rsync
320
321       Allow rsync servers to read and write /var/rsync/incoming by adding the
322       public_content_rw_t  type  to  the  directory and by restoring the file
323       type.  You also need to turn on the rsync_anon_write boolean.
324
325       semanage fcontext -a -t public_content_rw_t "/var/rsync/incoming(/.*)?"
326       restorecon -F -R -v /var/rsync/incoming
327       setsebool -P rsync_anon_write 1
328
329
330       If you want to allow rsync to modify public files used for public  file
331       transfer  services.   Files/Directories  must  be  labeled  public_con‐
332       tent_rw_t., you must turn on the rsync_anon_write boolean.
333
334       setsebool -P rsync_anon_write 1
335
336

COMMANDS

338       semanage fcontext can also be used to manipulate default  file  context
339       mappings.
340
341       semanage  permissive  can  also  be used to manipulate whether or not a
342       process type is permissive.
343
344       semanage module can also be used to enable/disable/install/remove  pol‐
345       icy modules.
346
347       semanage port can also be used to manipulate the port definitions
348
349       semanage boolean can also be used to manipulate the booleans
350
351
352       system-config-selinux is a GUI tool available to customize SELinux pol‐
353       icy settings.
354
355

AUTHOR

357       This manual page was auto-generated using sepolicy manpage .
358
359

SEE ALSO

361       selinux(8),  rsync(8),  semanage(8),  restorecon(8),  chcon(1),  sepol‐
362       icy(8), setsebool(8)
363
364
365
366rsync                              23-10-20                   rsync_selinux(8)
Impressum