crontab_selinux(8)
π crontab_selinux(8) β the crontab SELinux tea π
okay bestie, so this is the crontab_selinux page, part of the SELinux Policy crontab manual. it's short, it's sweet, it's giving "here's exactly how the crontab processes get locked down" and honestly we're obsessed. let's get into it β¨
πΈ NAME πΈ
crontab_selinux β the Security Enhanced Linux policy for the crontab processes. that's it, that's the name, slay.
β¨ DESCRIPTION β¨
Security-Enhanced Linux secures the crontab processes via flexible mandatory access control. yes bestie, the security is mandatory, the vibes are immaculate.
the crontab processes run with the crontab_t SELinux type. wanna check if you've got these processes running? just execute the ps command with the -Z qualifier, like this:
ps -eZ | grep crontab_t
that's the whole vibe check right there π¦
πͺ ENTRYPOINTS πͺ
so the crontab_t SELinux type can be entered via the crontab_exec_t file type. it's giving "the door to the domain" and we love a clear entrance π«
the default entrypoint paths for the crontab_t domain are literally these:
/usr/bin/(f)?crontab, /usr/bin/at, /usr/bin/fcronsighup,
/usr/libexec/fcronsighup
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. yes, every single one gets a little domain of its own, main character energy fr fr.
you can see the context of a process using the -Z option to ps β same trick as before, it never misses.
policy governs the access confined processes have to files. the SELinux crontab policy is very flexible, allowing users to setup their crontab processes in as secure a method as possible. highkey the best of both worlds π
the following process types are defined for crontab:
crontab_t
Note:semanage permissive -a crontab_tcan be used to make the process typecrontab_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it stops blocking but it still tells on you. the audacity π
π BOOLEANS π
SELinux policy is customizable based on least access required. the crontab policy is extremely flexible and has several booleans that let you manipulate the policy and run crontab with the tightest access possible. icon behavior, no cap.
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
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
π MANAGED FILES π
the SELinux process type crontab_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. note: the process's UID still needs to have DAC permissions. SELinux isn't doing your whole job for you bestie, it's a team effort π«Ά
crontab_tmp_tfaillog_t
/var/log/btmp.*
/run/faillock(/.*)?
/var/log/faillog.*
/var/log/tallylog.*
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
var_auth_t
/var/ace(/.*)?
/var/rsa(/.*)?
/var/lib/abl(/.*)?
/var/lib/rsa(/.*)?
/var/lib/pam_ssh(/.*)?
/var/lib/pam_shield(/.*)?
/var/opt/quest/vas/vasd(/.*)?
/var/lib/google-authenticator(/.*)?
ποΈ FILE CONTEXTS ποΈ
SELinux requires files to have an extended attribute to define the file type. it's the file's little name tag at the party, iykyk π
you can see the context of a file using the -Z option to ls.
policy governs the access confined processes have to these files. the SELinux crontab policy is very flexible, allowing users to setup their crontab processes in as secure a method as possible. (yes we said it again, it's that flexible, periodt.)
β STANDARD FILE CONTEXT β
SELinux defines the file context types for the crontab. if you wanted to store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk. the two-step glow-up, always:
semanage fcontext -a -t crontab_exec_t '/srv/crontab/content(/.*)?'
restorecon -R -v /srv/mycrontab_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. so the wildcards are doing a lot of heavy lifting, respect them π
the following file types are defined for crontab:
crontab_exec_t
- set files with the
crontab_exec_ttype, if you want to transition an executable to thecrontab_tdomain.
paths:
/usr/bin/(f)?crontab, /usr/bin/at, /usr/bin/fcronsighup,
/usr/libexec/fcronsighup
crontab_tmp_t
- set files with the
crontab_tmp_ttype, if you want to store crontab temporary files in the/tmpdirectories.
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. so:chcon= quick lil touch-up,semanage fcontext+restorecon= the permanent glow-up. don't mix them up bestie π
π οΈ COMMANDS π οΈ
here's the squad of tools that can also do stuff:
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 booleancan also be used to manipulate the booleans.system-config-selinuxis a GUI tool available to customize SELinux policy settings. (yes, a GUI, for the visual learners π)
π AUTHOR π
this manual page was auto-generated using sepolicy manpage. no human author, just robot energy, and honestly? it ate π€β¨
π SEE ALSO π
selinux(8), crontab(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
and that's the whole page diva π this beauty came from source crontab, dated 26-10-06, and belongs to the crontab_selinux(8) manual β go forth and label your files correctly, mwah ππΈπ¦
π¦ 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