ptchown_selinux(8)
π ptchown_selinux(8) β like, the whole manual, but make it make sense
okay so bestie, welcome to ptchown_selinux β that's the manpage for the SELinux policy that keeps the ptchown processes in check. It's filed under "SELinux Policy ptchown" in section 8 of your manual, and honestly? She's iconic. Let's get into it. π
β¨ NAME β¨
ptchown_selinux β the Security Enhanced Linux policy for the ptchown processes. that's the whole vibe. π«Ά
πΈ DESCRIPTION πΈ
so, Security-Enhanced Linux secures the ptchown processes via flexible mandatory access control. yes bestie, mandatory. she's not asking, she's telling. π
the ptchown processes run with the ptchown_t SELinux type. you wanna check if you've got these processes running? just run the ps command with the -Z qualifier, like this:
ps -eZ | grep ptchown_t
and boom, you'll see who's out there wearing the ptchown_t fit. π₯
πͺ ENTRYPOINTS πͺ
so how does a process even get into the ptchown_t club? glad you asked, babe. the ptchown_t SELinux type can be entered via the ptchown_exec_t file type. that's the invite-only door. ποΈ
and the default entrypoint paths for the ptchown_t domain are literally these two:
/usr/lib/pt_chown, /usr/libexec/pt_chown
no cap, those are the ones. β¨
π PROCESS TYPES π
SELinux defines process types (aka domains) for each process running on the system. it's giving assigned seating at a very exclusive party. π
you can peep the context of a process using the -Z option to ps. easy.
Policy governs the access that confined processes have to files. the SELinux ptchown policy is very flexible, allowing users to set up their ptchown processes in as secure a method as possible. she's adaptable AND safe. main character energy. π
the following process types are defined for ptchown:
ptchown_t
Note:semanage permissive -a ptchown_tcan be used to make the process typeptchown_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so likeβ¦ she won't block you, but she will be watching and taking notes. π
π¦ BOOLEANS π¦
SELinux policy is customizable based on least access required. the ptchown policy is extremely flexible and has several booleans that let you manipulate the policy and run ptchown with the tightest access possible. tightest. access. possible. periodt. π₯
so if you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. and hey β it's Enabled by default, so she's already slaying out of the box:
setsebool -P fips_mode 1
π FILE CONTEXTS π
SELinux requires files to have an extended attribute to define the file type. it's like a name tag but for security. π·οΈ
you can see the context of a file using the -Z option to ls. go look, she's labeled.
Policy governs the access confined processes have to these files. the SELinux ptchown policy is very flexible, allowing users to set up their ptchown processes in as secure a method as possible. yes, we're saying it again, because it's true. π
π§ STANDARD FILE CONTEXT π§
SELinux defines the file context types for ptchown. so if you wanted to store files with these types in a different path, 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 ptchown_exec_t '/srv/ptchown/content(/.*)?'
restorecon -R -v /srv/myptchown_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise. π
the following file types are defined for ptchown:
ptchown_exec_t
- set files with the
ptchown_exec_ttype if you want to transition an executable to theptchown_tdomain. that's the glow-up pipeline right there. β
Paths:
/usr/lib/pt_chown, /usr/libexec/pt_chown
Note: file context can be temporarily modified with thechconcommand. but if you want to permanently change the file context, you need to use thesemanage fcontextcommand. this will modify the SELinux labeling database. and then you'll need to userestoreconto apply the labels. temporary vs permanent, bestie β know the difference. π
π οΈ COMMANDS π οΈ
here's your toolbox, queen:
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 when you want to click instead of type. π
π AUTHOR π
this manual page was auto-generated using sepolicy manpage. she wrote herself, honestly iconic behavior. β¨
π SEE ALSO π
selinux(8), ptchown(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
go read those too, iykyk. π
and that's the whole thing, bestie β ptchown manual page, sourced from the ptchown package, dated 26-10-06, living in ptchown_selinux(8). mwah π stay labeled, stay slay. π
π¦ 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