mount_selinux(8)
π
mount_selinux(8) β the SELinux glow-up for the mount processes
okay so bestie, you're looking at the mount_selinux manual page, living under the SELinux Policy mount umbrella. Buckle up, it's giving policy realness and honestly it slays.
πΈ NAME
mount_selinux β the Security Enhanced Linux Policy for the mount processes. periodt.
β¨ DESCRIPTION
Security-Enhanced Linux secures the mount processes via flexible mandatory access control. yes, flexible. mandatory. access control. she's doing it all.
The mount processes execute with the mount_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier. fr fr, -Z is the one that shows you the contexts.
For example:
ps -eZ | grep mount_t
go off, grep. π₯
π¦ ENTRYPOINTS
The mount_t SELinux type can be entered via the fusermount_exec_t, mount_exec_t file types. those are the doorways, bestie.
The default entrypoint paths for the mount_t domain are the following:
/usr/bin/fusermount[0-9]?, /usr/bin/mount.*, /usr/bin/umount.*
π PROCESS TYPES
SELinux defines process types (domains) for each process running on the system. every process gets a little label, it's their whole identity.
You can see the context of a process using the -Z option to ps.
Policy governs the access confined processes have to files. SELinux mount policy is very flexible allowing users to setup their mount processes in as secure a method as possible. highkey iconic.
The following process types are defined for mount:
mount_tmount_ecryptfs_t
Note:semanage permissive -a mount_tcan be used to make the process typemount_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, she's off the hook but still snitching to the logs. π
π BOOLEANS
SELinux policy is customizable based on least access required. mount policy is extremely flexible and has several booleans that allow you to manipulate the policy and run mount with the tightest access possible. we love a customizable queen.
If you want to deny user domains applications to map a memory region as both executable and writable, this is dangerous and the executable should be reported in bugzilla, you must turn on the deny_execmem boolean. Disabled by default.
setsebool -P deny_execmem 1
If you want to control the ability to mmap a low area of the address space, as configured by /proc/sys/vm/mmap_min_addr, you must turn on the mmap_low_allowed boolean. Disabled by default.
setsebool -P mmap_low_allowed 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
If you want to disable kernel module loading, you must turn on the secure_mode_insmod boolean. Disabled by default.
setsebool -P secure_mode_insmod 1
If you want to allow unconfined executables to make their heap memory executable. Doing this is a really bad idea. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla, you must turn on the selinuxuser_execheap boolean. Disabled by default. (not the cute kind of executive decision, bestie π)
setsebool -P selinuxuser_execheap 1
If you want to allow unconfined executables to make their stack executable. This should never, ever be necessary. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla, you must turn on the selinuxuser_execstack boolean. Disabled by default. like, never ever. I said what I said. π
setsebool -P selinuxuser_execstack 1
π PORT TYPES
SELinux defines port types to represent TCP and UDP ports. every port has a vibe, and the vibe has a type.
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. SELinux mount policy is very flexible allowing users to setup their mount processes in as secure a method as possible.
The following port types are defined for mount:
mountd_port_t
Default Defined Ports:
tcp 20048
udp 20048
π MANAGED FILES
The SELinux process type mount_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions. (SELinux isn't out here overriding DAC, she's just adding her own layer of β¨standardsβ¨.)
file_type- all files on the system
like, all of them. every single one. main character energy on a global scale.
π§ FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type. yes, files have lore now.
You can see the context of a file using the -Z option to ls.
Policy governs the access confined processes have to these files. SELinux mount policy is very flexible allowing users to setup their mount processes in as secure a method as possible.
π STANDARD FILE CONTEXT
SELinux defines the file context types for the mount, 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.
semanage fcontext -a -t mount_exec_t '/srv/mount/content(/.*)?'
restorecon -R -v /srv/mymount_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 mount:
π
mount_ecryptfs_exec_t
- Set files with the
mount_ecryptfs_exec_ttype, if you want to transition an executable to themount_ecryptfs_tdomain.
Paths:
/usr/bin/mount.ecryptfs, /usr/bin/umount.ecryptfs,
/usr/bin/mount.ecryptfs_private, /usr/bin/umount.ecryptfs_private
π
mount_ecryptfs_tmpfs_t
- Set files with the
mount_ecryptfs_tmpfs_ttype, if you want to store mount ecryptfs files on atmpfsfile system.
π
mount_exec_t
- Set files with the
mount_exec_ttype, if you want to transition an executable to themount_tdomain.
Paths:
/usr/bin/mount.*, /usr/bin/umount.*
π
mount_loopback_t
- Set files with the
mount_loopback_ttype, if you want to treat the files as mount loopback data.
π
mount_tmp_t
- Set files with the
mount_tmp_ttype, if you want to store mount temporary files in the/tmpdirectories.
π
mount_var_run_t
- Set files with the
mount_var_run_ttype, if you want to store the mount files under the/runor/var/rundirectory.
Paths:
/run/mount(/.*)?, /dev/.mount(/.*)?, /run/davfs2(/.*)?,
/var/cache/davfs2(/.*)?
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. temporary vs permanent, know the difference bestie π
β COMMANDS
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 definitionssemanage booleancan also be used to manipulate the booleanssystem-config-selinuxis a GUI tool available to customize SELinux policy settings. (a GUI! for the visual learners, we love to see it π)
πΈ AUTHOR
This manual page was auto-generated using sepolicy manpage. no human authored this, she was born from a script and honestly? still ate.
π₯ SEE ALSO
selinux(8), mount(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), mount_ecryptfs_selinux(8), mount_ecryptfs_selinux(8)
(yes, mount_ecryptfs_selinux(8) is in there twice β she said "and I'll say it again" π)
and that's the whole page, bestie! π¦ this one's from the mount manual, dated 26-10-06 β go forth and label responsibly, iykyk. πβ¨
π¦ 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