1tftpd_selinux(8) SELinux Policy tftpd tftpd_selinux(8)
2
3
4
6 tftpd_selinux - Security Enhanced Linux Policy for the tftpd processes
7
9 Security-Enhanced Linux secures the tftpd processes via flexible manda‐
10 tory access control.
11
12 The tftpd processes execute with the tftpd_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 tftpd_t
19
20
21
23 The tftpd_t SELinux type can be entered via the tftpd_exec_t file type.
24
25 The default entrypoint paths for the tftpd_t domain are the following:
26
27 /usr/sbin/atftpd, /usr/sbin/in.tftpd
28
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 tftpd policy is very flexible allowing users to setup their tftpd pro‐
37 cesses in as secure a method as possible.
38
39 The following process types are defined for tftpd:
40
41 tftpd_t
42
43 Note: semanage permissive -a tftpd_t can be used to make the process
44 type tftpd_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
50 SELinux policy is customizable based on least access required. tftpd
51 policy is extremely flexible and has several booleans that allow you to
52 manipulate the policy and run tftpd with the tightest access possible.
53
54
55
56 If you want to allow tftp to read and write files in the user home
57 directories, you must turn on the tftp_home_dir boolean. Disabled by
58 default.
59
60 setsebool -P tftp_home_dir 1
61
62
63
64 If you want to allow users to resolve user passwd entries directly from
65 ldap rather then using a sssd server, you must turn on the authlo‐
66 gin_nsswitch_use_ldap boolean. Disabled by default.
67
68 setsebool -P authlogin_nsswitch_use_ldap 1
69
70
71
72 If you want to allow all domains to execute in fips_mode, you must turn
73 on the fips_mode boolean. Enabled by default.
74
75 setsebool -P fips_mode 1
76
77
78
79 If you want to allow confined applications to run with kerberos, you
80 must turn on the kerberos_enabled boolean. Enabled by default.
81
82 setsebool -P kerberos_enabled 1
83
84
85
86 If you want to allow system to run with NIS, you must turn on the
87 nis_enabled boolean. Disabled by default.
88
89 setsebool -P nis_enabled 1
90
91
92
93 If you want to allow confined applications to use nscd shared memory,
94 you must turn on the nscd_use_shm boolean. Enabled by default.
95
96 setsebool -P nscd_use_shm 1
97
98
99
101 SELinux defines port types to represent TCP and UDP ports.
102
103 You can see the types associated with a port by using the following
104 command:
105
106 semanage port -l
107
108
109 Policy governs the access confined processes have to these ports.
110 SELinux tftpd policy is very flexible allowing users to setup their
111 tftpd processes in as secure a method as possible.
112
113 The following port types are defined for tftpd:
114
115
116 tftp_port_t
117
118
119
120 Default Defined Ports:
121 udp 69
122
124 The SELinux process type tftpd_t can manage files labeled with the fol‐
125 lowing file types. The paths listed are the default paths for these
126 file types. Note the processes UID still need to have DAC permissions.
127
128 cifs_t
129
130
131 cluster_conf_t
132
133 /etc/cluster(/.*)?
134
135 cluster_var_lib_t
136
137 /var/lib/pcsd(/.*)?
138 /var/lib/cluster(/.*)?
139 /var/lib/openais(/.*)?
140 /var/lib/pengine(/.*)?
141 /var/lib/corosync(/.*)?
142 /usr/lib/heartbeat(/.*)?
143 /var/lib/heartbeat(/.*)?
144 /var/lib/pacemaker(/.*)?
145
146 cluster_var_run_t
147
148 /var/run/crm(/.*)?
149 /var/run/cman_.*
150 /var/run/rsctmp(/.*)?
151 /var/run/aisexec.*
152 /var/run/heartbeat(/.*)?
153 /var/run/corosync-qnetd(/.*)?
154 /var/run/corosync-qdevice(/.*)?
155 /var/run/corosync.pid
156 /var/run/cpglockd.pid
157 /var/run/rgmanager.pid
158 /var/run/cluster/rgmanager.sk
159
160 ecryptfs_t
161
162 /home/[^/]+/.Private(/.*)?
163 /home/[^/]+/.ecryptfs(/.*)?
164
165 fusefs_t
166
167 /var/run/user/[^/]*/gvfs
168
169 nfs_t
170
171
172 public_content_rw_t
173
174 /var/spool/abrt-upload(/.*)?
175
176 root_t
177
178 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
179 /
180 /initrd
181
182 tftpd_var_run_t
183
184
185 tftpdir_rw_t
186
187 /var/lib/tftpboot(/.*)?
188
189 user_home_type
190
191 all user home files
192
193
195 SELinux requires files to have an extended attribute to define the file
196 type.
197
198 You can see the context of a file using the -Z option to ls
199
200 Policy governs the access confined processes have to these files.
201 SELinux tftpd policy is very flexible allowing users to setup their
202 tftpd processes in as secure a method as possible.
203
204 STANDARD FILE CONTEXT
205
206 SELinux defines the file context types for the tftpd, if you wanted to
207 store files with these types in a diffent paths, you need to execute
208 the semanage command to sepecify alternate labeling and then use
209 restorecon to put the labels on disk.
210
211 semanage fcontext -a -t tftpd_etc_t '/srv/mytftpd_content(/.*)?'
212 restorecon -R -v /srv/mytftpd_content
213
214 Note: SELinux often uses regular expressions to specify labels that
215 match multiple files.
216
217 The following file types are defined for tftpd:
218
219
220
221 tftpd_etc_t
222
223 - Set files with the tftpd_etc_t type, if you want to store tftpd files
224 in the /etc directories.
225
226
227
228 tftpd_exec_t
229
230 - Set files with the tftpd_exec_t type, if you want to transition an
231 executable to the tftpd_t domain.
232
233
234 Paths:
235 /usr/sbin/atftpd, /usr/sbin/in.tftpd
236
237
238 tftpd_var_run_t
239
240 - Set files with the tftpd_var_run_t type, if you want to store the
241 tftpd files under the /run or /var/run directory.
242
243
244
245 tftpdir_rw_t
246
247 - Set files with the tftpdir_rw_t type, if you want to treat the files
248 as tftpdir read/write content.
249
250
251
252 tftpdir_t
253
254 - Set files with the tftpdir_t type, if you want to treat the files as
255 tftpdir data.
256
257
258 Paths:
259 /tftpboot/.*, /tftpboot
260
261
262 Note: File context can be temporarily modified with the chcon command.
263 If you want to permanently change the file context you need to use the
264 semanage fcontext command. This will modify the SELinux labeling data‐
265 base. You will need to use restorecon to apply the labels.
266
267
269 If you want to share files with multiple domains (Apache, FTP, rsync,
270 Samba), you can set a file context of public_content_t and public_con‐
271 tent_rw_t. These context allow any of the above domains to read the
272 content. If you want a particular domain to write to the public_con‐
273 tent_rw_t domain, you must set the appropriate boolean.
274
275 Allow tftpd servers to read the /var/tftpd directory by adding the pub‐
276 lic_content_t file type to the directory and by restoring the file
277 type.
278
279 semanage fcontext -a -t public_content_t "/var/tftpd(/.*)?"
280 restorecon -F -R -v /var/tftpd
281
282 Allow tftpd servers to read and write /var/tftpd/incoming by adding the
283 public_content_rw_t type to the directory and by restoring the file
284 type. You also need to turn on the tftpd_anon_write boolean.
285
286 semanage fcontext -a -t public_content_rw_t "/var/tftpd/incoming(/.*)?"
287 restorecon -F -R -v /var/tftpd/incoming
288 setsebool -P tftpd_anon_write 1
289
290
291 If you want to allow tftp to modify public files used for public file
292 transfer services., you must turn on the tftp_anon_write boolean.
293
294 setsebool -P tftp_anon_write 1
295
296
298 semanage fcontext can also be used to manipulate default file context
299 mappings.
300
301 semanage permissive can also be used to manipulate whether or not a
302 process type is permissive.
303
304 semanage module can also be used to enable/disable/install/remove pol‐
305 icy modules.
306
307 semanage port can also be used to manipulate the port definitions
308
309 semanage boolean can also be used to manipulate the booleans
310
311
312 system-config-selinux is a GUI tool available to customize SELinux pol‐
313 icy settings.
314
315
317 This manual page was auto-generated using sepolicy manpage .
318
319
321 selinux(8), tftpd(8), semanage(8), restorecon(8), chcon(1), sepol‐
322 icy(8), setsebool(8)
323
324
325
326tftpd 19-10-08 tftpd_selinux(8)