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 all domains to execute in fips_mode, you must turn
79       on the fips_mode boolean. Enabled by default.
80
81       setsebool -P fips_mode 1
82
83
84

PORT TYPES

86       SELinux defines port types to represent TCP and UDP ports.
87
88       You  can  see  the  types associated with a port by using the following
89       command:
90
91       semanage port -l
92
93
94       Policy governs the access  confined  processes  have  to  these  ports.
95       SELinux  rsync  policy  is  very flexible allowing users to setup their
96       rsync processes in as secure a method as possible.
97
98       The following port types are defined for rsync:
99
100
101       rsync_port_t
102
103
104
105       Default Defined Ports:
106                 tcp 873
107                 udp 873
108

MANAGED FILES

110       The SELinux process type rsync_t can manage files labeled with the fol‐
111       lowing  file  types.   The paths listed are the default paths for these
112       file types.  Note the processes UID still need to have DAC permissions.
113
114       cifs_t
115
116
117       cluster_conf_t
118
119            /etc/cluster(/.*)?
120
121       cluster_var_lib_t
122
123            /var/lib/pcsd(/.*)?
124            /var/lib/cluster(/.*)?
125            /var/lib/openais(/.*)?
126            /var/lib/pengine(/.*)?
127            /var/lib/corosync(/.*)?
128            /usr/lib/heartbeat(/.*)?
129            /var/lib/heartbeat(/.*)?
130            /var/lib/pacemaker(/.*)?
131
132       cluster_var_run_t
133
134            /var/run/crm(/.*)?
135            /var/run/cman_.*
136            /var/run/rsctmp(/.*)?
137            /var/run/aisexec.*
138            /var/run/heartbeat(/.*)?
139            /var/run/corosync-qnetd(/.*)?
140            /var/run/corosync-qdevice(/.*)?
141            /var/run/corosync.pid
142            /var/run/cpglockd.pid
143            /var/run/rgmanager.pid
144            /var/run/cluster/rgmanager.sk
145
146       ecryptfs_t
147
148            /home/[^/]+/.Private(/.*)?
149            /home/[^/]+/.ecryptfs(/.*)?
150
151       fusefs_t
152
153            /var/run/user/[^/]*/gvfs
154
155       nfs_t
156
157
158       non_auth_file_type
159
160
161       root_t
162
163            /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
164            /
165            /initrd
166
167       rsync_log_t
168
169            /var/log/rsync.*
170
171       rsync_var_run_t
172
173            /var/run/rsyncd.lock
174            /var/run/swift_server.lock
175
176       swift_data_t
177
178            /srv/node(/.*)?
179            /var/lib/swift(/.*)?
180            /srv/loopback-device(/.*)?
181
182       swift_lock_t
183
184            /var/lock/swift.*
185
186

FILE CONTEXTS

188       SELinux requires files to have an extended attribute to define the file
189       type.
190
191       You can see the context of a file using the -Z option to ls
192
193       Policy  governs  the  access  confined  processes  have to these files.
194       SELinux rsync policy is very flexible allowing  users  to  setup  their
195       rsync processes in as secure a method as possible.
196
197       STANDARD FILE CONTEXT
198
199       SELinux  defines the file context types for the rsync, if you wanted to
200       store files with these types in a diffent paths, you  need  to  execute
201       the  semanage  command  to  sepecify  alternate  labeling  and then use
202       restorecon to put the labels on disk.
203
204       semanage fcontext -a -t rsync_var_run_t '/srv/myrsync_content(/.*)?'
205       restorecon -R -v /srv/myrsync_content
206
207       Note: SELinux often uses regular expressions  to  specify  labels  that
208       match multiple files.
209
210       The following file types are defined for rsync:
211
212
213
214       rsync_data_t
215
216       -  Set files with the rsync_data_t type, if you want to treat the files
217       as rsync content.
218
219
220
221       rsync_etc_t
222
223       - Set files with the rsync_etc_t type, if you want to store rsync files
224       in the /etc directories.
225
226
227
228       rsync_exec_t
229
230       -  Set  files  with the rsync_exec_t type, if you want to transition an
231       executable to the rsync_t domain.
232
233
234
235       rsync_log_t
236
237       - Set files with the rsync_log_t type, if you want to treat the data as
238       rsync log data, usually stored under the /var/log directory.
239
240
241
242       rsync_tmp_t
243
244       -  Set files with the rsync_tmp_t type, if you want to store rsync tem‐
245       porary files in the /tmp directories.
246
247
248
249       rsync_var_run_t
250
251       - Set files with the rsync_var_run_t type, if you  want  to  store  the
252       rsync files under the /run or /var/run directory.
253
254
255       Paths:
256            /var/run/rsyncd.lock, /var/run/swift_server.lock
257
258
259       Note:  File context can be temporarily modified with the chcon command.
260       If you want to permanently change the file context you need to use  the
261       semanage fcontext command.  This will modify the SELinux labeling data‐
262       base.  You will need to use restorecon to apply the labels.
263
264

SHARING FILES

266       If you want to share files with multiple domains (Apache,  FTP,  rsync,
267       Samba),  you can set a file context of public_content_t and public_con‐
268       tent_rw_t.  These context allow any of the above domains  to  read  the
269       content.   If  you want a particular domain to write to the public_con‐
270       tent_rw_t domain, you must set the appropriate boolean.
271
272       Allow rsync servers to read the /var/rsync directory by adding the pub‐
273       lic_content_t  file  type  to  the  directory and by restoring the file
274       type.
275
276       semanage fcontext -a -t public_content_t "/var/rsync(/.*)?"
277       restorecon -F -R -v /var/rsync
278
279       Allow rsync servers to read and write /var/rsync/incoming by adding the
280       public_content_rw_t  type  to  the  directory and by restoring the file
281       type.  You also need to turn on the rsync_anon_write boolean.
282
283       semanage fcontext -a -t public_content_rw_t "/var/rsync/incoming(/.*)?"
284       restorecon -F -R -v /var/rsync/incoming
285       setsebool -P rsync_anon_write 1
286
287
288       If you want to allow rsync to modify public files used for public  file
289       transfer  services.   Files/Directories  must  be  labeled  public_con‐
290       tent_rw_t., you must turn on the rsync_anon_write boolean.
291
292       setsebool -P rsync_anon_write 1
293
294

COMMANDS

296       semanage fcontext can also be used to manipulate default  file  context
297       mappings.
298
299       semanage  permissive  can  also  be used to manipulate whether or not a
300       process type is permissive.
301
302       semanage module can also be used to enable/disable/install/remove  pol‐
303       icy modules.
304
305       semanage port can also be used to manipulate the port definitions
306
307       semanage boolean can also be used to manipulate the booleans
308
309
310       system-config-selinux is a GUI tool available to customize SELinux pol‐
311       icy settings.
312
313

AUTHOR

315       This manual page was auto-generated using sepolicy manpage .
316
317

SEE ALSO

319       selinux(8),  rsync(8),  semanage(8),  restorecon(8),  chcon(1),  sepol‐
320       icy(8), setsebool(8)
321
322
323
324rsync                              21-03-26                   rsync_selinux(8)
Impressum