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 to run as a server, you  must  turn  on  the
71       rsync_server boolean. Disabled by default.
72
73       setsebool -P rsync_server 1
74
75
76
77       If  you  want  to  allow rsync servers to share cifs files systems, you
78       must turn on the rsync_use_cifs boolean. Disabled by default.
79
80       setsebool -P rsync_use_cifs 1
81
82
83
84       If you want to allow rsync servers to share nfs files systems, you must
85       turn on the rsync_use_nfs boolean. Disabled by default.
86
87       setsebool -P rsync_use_nfs 1
88
89
90
91       If you want to allow all domains to use other domains file descriptors,
92       you must turn on the allow_domain_fd_use boolean. Enabled by default.
93
94       setsebool -P allow_domain_fd_use 1
95
96
97
98       If you want to allow confined applications to run  with  kerberos,  you
99       must turn on the allow_kerberos boolean. Enabled by default.
100
101       setsebool -P allow_kerberos 1
102
103
104
105       If  you want to allow sysadm to debug or ptrace all processes, you must
106       turn on the allow_ptrace boolean. Disabled by default.
107
108       setsebool -P allow_ptrace 1
109
110
111
112       If you want to allow system to run with  NIS,  you  must  turn  on  the
113       allow_ypbind boolean. Disabled by default.
114
115       setsebool -P allow_ypbind 1
116
117
118
119       If  you  want to allow all domains to have the kernel load modules, you
120       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
121       default.
122
123       setsebool -P domain_kernel_load_modules 1
124
125
126
127       If you want to allow all domains to execute in fips_mode, you must turn
128       on the fips_mode boolean. Enabled by default.
129
130       setsebool -P fips_mode 1
131
132
133
134       If you want to enable reading of urandom for all domains, you must turn
135       on the global_ssp boolean. Disabled by default.
136
137       setsebool -P global_ssp 1
138
139
140
141       If  you  want to allow confined applications to use nscd shared memory,
142       you must turn on the nscd_use_shm boolean. Enabled by default.
143
144       setsebool -P nscd_use_shm 1
145
146
147

PORT TYPES

149       SELinux defines port types to represent TCP and UDP ports.
150
151       You can see the types associated with a port  by  using  the  following
152       command:
153
154       semanage port -l
155
156
157       Policy  governs  the  access  confined  processes  have to these ports.
158       SELinux rsync policy is very flexible allowing  users  to  setup  their
159       rsync processes in as secure a method as possible.
160
161       The following port types are defined for rsync:
162
163
164       rsync_port_t
165
166
167
168       Default Defined Ports:
169                 tcp 873
170                 udp 873
171

MANAGED FILES

173       The SELinux process type rsync_t can manage files labeled with the fol‐
174       lowing file types.  The paths listed are the default  paths  for  these
175       file types.  Note the processes UID still need to have DAC permissions.
176
177       cifs_t
178
179
180       initrc_tmp_t
181
182
183       mnt_t
184
185            /mnt(/[^/]*)
186            /mnt(/[^/]*)?
187            /rhev(/[^/]*)?
188            /media(/[^/]*)
189            /media(/[^/]*)?
190            /etc/rhgb(/.*)?
191            /media/.hal-.*
192            /net
193            /afs
194            /rhev
195            /misc
196
197       nfs_t
198
199
200       public_content_rw_t
201
202            /var/spool/abrt-upload(/.*)?
203
204       rsync_data_t
205
206
207       rsync_log_t
208
209            /var/log/rsync.log.*
210
211       rsync_tmp_t
212
213
214       rsync_var_run_t
215
216            /var/run/rsyncd.lock
217
218       swift_data_t
219
220            /srv/node(/.*)?
221            /srv/loopback-device(/.*)?
222
223       swift_lock_t
224
225            /var/lock/swift.*
226
227       tmp_t
228
229            /tmp
230            /usr/tmp
231            /var/tmp
232            /tmp-inst
233            /var/tmp-inst
234            /var/tmp/vi.recover
235
236

FILE CONTEXTS

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

SHARING FILES

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

COMMANDS

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

AUTHOR

362       This manual page was auto-generated using sepolicy manpage .
363
364

SEE ALSO

366       selinux(8),  rsync(8),  semanage(8),  restorecon(8),  chcon(1) , setse‐
367       bool(8)
368
369
370
371rsync                              15-06-03                   rsync_selinux(8)
Impressum