tftpd_selinux(8)
π tftpd_selinux β the SELinux tea for your tftpd processes
okay so bestie, welcome to tftpd_selinux(8), the manual page that spills all the SELinux policy tea about the tftpd processes. yes, that's the whole NAME section, we're moving, keep up πββοΈπ¨
β¨ DESCRIPTION β¨
Security-Enhanced Linux secures the tftpd processes via flexible mandatory access control. that's the whole vibe β mandatory access control, no negotiating, no "please sir may I", it just is. π
Your tftpd processes run with the tftpd_t SELinux type. wanna check if you've got these processes running? just run the ps command with the -Z qualifier. like this, literally copy-paste:
ps -eZ | grep tftpd_t
see? easy. slay. β¨
πͺ ENTRYPOINTS πͺ
so how does a process even get into the tftpd_t SELinux type? through the tftpd_exec_t file type, bestie. that's the door. πͺ
the default entrypoint paths for the tftpd_t domain are, and I quote:
/usr/bin/atftpd, /usr/bin/in.tftpd
those two. those are the ones. π
π― PROCESS TYPES π―
SELinux defines process types (domains) for each process running on the system. yes, each one. it's a lot. it's giving organized. ποΈ
you can see the context of a process using the -Z option to ps. same trick as before, it's a classic for a reason.
Policy governs the access confined processes have to files. the SELinux tftpd policy is very flexible, allowing users to set up their tftpd processes in as secure a method as possible. flexible and secure, we love a multitalented icon. π
The following process types are defined for tftpd:
tftpd_t
Note:semanage permissive -a tftpd_tcan be used to make the process typetftpd_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it won't block anything, but it will absolutely still be in the group chat talking about it. π
π BOOLEANS π
SELinux policy is customizable based on least access required β least access, bestie, we're minimalists now. π§ββοΈ the tftpd policy is extremely flexible and has several booleans that let you manipulate the policy and run tftpd with the tightest access possible.
tftp_home_dir β if you want to allow tftp to read and write files in the user home directories, you must turn on the tftp_home_dir boolean. Disabled by default.
setsebool -P tftp_home_dir 1
daemons_dontaudit_scheduling β if you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on the daemons_dontaudit_scheduling boolean. Enabled by default.
setsebool -P daemons_dontaudit_scheduling 1
fips_mode β if you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.
setsebool -P fips_mode 1
nis_enabled β if you want to allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default.
setsebool -P nis_enabled 1
use_nfs_home_dirs β if you want to support NFS home directories, you must turn on the use_nfs_home_dirs boolean. Enabled by default.
setsebool -P use_nfs_home_dirs 1
use_samba_home_dirs β if you want to support SAMBA home directories, you must turn on the use_samba_home_dirs boolean. Disabled by default.
setsebool -P use_samba_home_dirs 1
see, six booleans, six little switches, and every single one of them is a whole personality trait. flip responsibly. ποΈβ¨
π PORT TYPES π
SELinux defines port types to represent TCP and UDP ports. ports are just vibes with numbers attached, honestly. π’
you can see the types associated with a port by using the following command:
semanage port -l
Policy governs the access confined processes have to these ports. the SELinux tftpd policy is very flexible, allowing users to set up their tftpd processes in as secure a method as possible. (yes I said that before, it's still true, consistency is a flex π
)
The following port types are defined for tftpd:
tftp_port_t
Default Defined Ports:
udp 69
udp 69. nice. iconic number, no notes. π
π MANAGED FILES π
the SELinux process type tftpd_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. and remember bestie β the process's UID still needs to have DAC permissions. SELinux isn't out here overriding the classics. π
ββοΈ
cifs_t
cluster_conf_t
/etc/cluster(/.*)?
cluster_var_lib_t
/var/lib/pcsd(/.*)?
/var/lib/cluster(/.*)?
/var/lib/openais(/.*)?
/var/lib/pengine(/.*)?
/var/lib/corosync(/.*)?
/usr/lib/heartbeat(/.*)?
/var/lib/heartbeat(/.*)?
/var/lib/pacemaker(/.*)?
cluster_var_run_t
/run/crm(/.*)?
/run/cman_.*
/run/rsctmp(/.*)?
/run/aisexec.*
/run/heartbeat(/.*)?
/run/pcsd-ruby.socket
/run/corosync-qnetd(/.*)?
/run/corosync-qdevice(/.*)?
/run/pcsd.socket
/run/corosync.pid
/run/cpglockd.pid
/run/rgmanager.pid
/run/cluster/rgmanager.sk
ecryptfs_t
/home/[^/]+/.Private(/.*)?
/home/[^/]+/.ecryptfs(/.*)?
fusefs_t
/run/user/[0-9]+/gvfs
krb5_host_rcache_t
/var/tmp/krb5_0.rcache2
/var/cache/krb5rcache(/.*)?
/var/tmp/nfs_0
/var/tmp/DNS_25
/var/tmp/host_0
/var/tmp/imap_0
/var/tmp/HTTP_23
/var/tmp/HTTP_48
/var/tmp/ldap_55
/var/tmp/ldap_487
/var/tmp/ldapmap1_0
nfs_t
root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp
tftpd_var_run_t
tftpdir_rw_t
/var/lib/tftpboot(/.*)?
okay that was a lot of paths. hydrate. drink water. you ate that. π§π«Ά
π·οΈ FILE CONTEXTS π·οΈ
SELinux requires files to have an extended attribute to define the file type. yes, files have extended attributes, they're complex little creatures with rich inner lives. π¦
you can see the context of a file using the -Z option to ls. same -Z energy as before, it's a family tradition at this point.
Policy governs the access confined processes have to these files. the SELinux tftpd policy is very flexible, allowing users to set up their tftpd processes in as secure a method as possible.
π STANDARD FILE CONTEXT π
SELinux defines the file context types for the tftpd. if you wanted to store files with these types in different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk. like so:
semanage fcontext -a -t tftpd_exec_t '/srv/tftpd/content(/.*)?'
restorecon -R -v /srv/mytftpd_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies stay winning. π§ββοΈ
The following file types are defined for tftpd:
tftpd_etc_t
- Set files with the
tftpd_etc_ttype, if you want to store tftpd files in the/etcdirectories.
tftpd_exec_t
- Set files with the
tftpd_exec_ttype, if you want to transition an executable to thetftpd_tdomain.
Paths:
/usr/bin/atftpd, /usr/bin/in.tftpd
tftpd_var_run_t
- Set files with the
tftpd_var_run_ttype, if you want to store the tftpd files under the/runor/var/rundirectory.
tftpdir_rw_t
- Set files with the
tftpdir_rw_ttype, if you want to treat the files as tftpdir read/write content.
tftpdir_t
- Set files with the
tftpdir_ttype, if you want to treat the files as tftpdir data.
Paths:
/tftpboot/.*, /tftpboot
Note: File context can be temporarily modified with thechconcommand. If you want to permanently change the file context you need to use thesemanage fcontextcommand. This will modify the SELinux labeling database. You will need to userestoreconto apply the labels. temporarily vs permanently is literally the whole plot of this story, don't mix them up bestie π
π€ SHARING FILES π€
if you want to share files with multiple domains (Apache, FTP, rsync, Samba), you can set a file context of public_content_t and public_content_rw_t. these contexts allow any of the above domains to read the content. group project energy, but make it secure. π―ββοΈ
if you want a particular domain to write to the public_content_rw_t domain, you must set the appropriate boolean.
Allow tftpd servers to read the /var/tftpd directory by adding the public_content_t file type to the directory and by restoring the file type:
semanage fcontext -a -t public_content_t "/var/tftpd(/.*)?"
restorecon -F -R -v /var/tftpd
Allow tftpd servers to read and write /var/tftpd/incoming by adding the public_content_rw_t type to the directory and by restoring the file type. you also need to turn on the tftpd_anon_write boolean:
semanage fcontext -a -t public_content_rw_t "/var/tftpd/incoming(/.*)?"
restorecon -F -R -v /var/tftpd/incoming
setsebool -P tftpd_anon_write 1
if you want to allow tftp to modify public files used for public file transfer services., you must turn on the tftp_anon_write boolean:
setsebool -P tftp_anon_write 1
(yes, both spellings show up above β tftpd_anon_write in the command, tftp_anon_write in the boolean sentence. I'm not fixing it, I'm just reporting the tea exactly as it was served π΅)
β¨οΈ COMMANDS β¨οΈ
so you wanna do stuff? here's the toolkit, bestie:
semanage fcontextcan also be used to manipulate default file context mappings.semanage permissivecan also be used to manipulate whether or not a process type is permissive.semanage modulecan also be used to enable/disable/install/remove policy modules.semanage portcan also be used to manipulate the port definitions.semanage booleancan also be used to manipulate the booleans.system-config-selinuxis a GUI tool available to customize SELinux policy settings. a GUI! for the girlies who like a little pointing and clicking with their mandatory access control π±οΈβ¨
βοΈ AUTHOR βοΈ
This manual page was auto-generated using sepolicy manpage. a bot wrote this. a policy bot. and honestly? it ate. π
π SEE ALSO π
selinux(8), tftpd(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
and that's the whole page, bestie, you're literally an SELinux tftpd expert now, no cap π§ββοΈβ¨ this little number came to you courtesy of the tftpd manual, dated 26-10-06, living at tftpd_selinux(8) β go forth and label things correctly, ily, bye πππ¦
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms