memcached_selinux(8)
π memcached_selinux β the SELinux policy page for your memcached processes
okay so bestie, welcome to memcached_selinux(8), which is a whole manual page about the Security Enhanced Linux policy that wraps around the memcached processes. yes it's a lot of words. no you're not allowed to skip it. let's go π«Ά
β¨ NAME β¨
memcached_selinux β the Security Enhanced Linux Policy for the memcached processes. that's it. that's the name. iconic behaviour honestly π
πΈ DESCRIPTION πΈ
Security-Enhanced Linux secures the memcached processes via flexible mandatory access control. like, it's not out here asking politely β it's mandatory. it's controlling. it's MAC and it ate π
The memcached processes execute with the memcached_t SELinux type. and no, you can't just assume that β you gotta check. run the ps command with the -Z qualifier and see for yourself:
ps -eZ | grep memcached_t
that's the vibe check, fr fr. if memcached_t shows up in the output, your processes are living that SELinux life β¨
πͺ ENTRYPOINTS πͺ
so how do you even get into the memcached_t SELinux type? through the memcached_exec_t file type, bestie. that's the door πͺ
The default entrypoint paths for the memcached_t domain are literally just:
/usr/bin/memcached
one path. one single path. she's lowkey exclusive and honestly? respect π
π PROCESS TYPES π
SELinux defines process types (aka domains) for each process running on the system. every process gets a little label, it's giving name tag energy at a party π
You can see the context of a process using the -Z option to ps. yes, -Z again. get used to her, she's the main character of this whole page.
Policy governs the access confined processes have to files. the SELinux memcached policy is very flexible, allowing users to setup their memcached processes in as secure a method as possible. flexible and secure? we love a multitasker π
The following process types are defined for memcached:
memcached_t
Note:semanage permissive -a memcached_tcan be used to make the process typememcached_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 memcached policy is extremely flexible and has several booleans that allow you to manipulate the policy and run memcached with the tightest access possible. customise your girl's boundaries, basically π
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
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
π¦ PORT TYPES π¦
SELinux defines port types to represent TCP and UDP ports. yes, even the ports have labels. everyone's got a label. it's giving β¨organizedβ¨
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 memcached policy is very flexible allowing users to setup their memcached processes in as secure a method as possible. (she says this a lot but honestly? consistency queen π)
The following port types are defined for memcached:
memcache_port_t
Default Defined Ports:
tcp 11211
udp 11211
11211 twice, once for tcp and once for udp. she contains multitudes πΈ
ποΈ MANAGED FILES ποΈ
The SELinux process type memcached_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. like, SELinux isn't out here doing DAC's job, she has her own lane, okurrr π
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
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
memcached_var_run_t
/run/memcached(/.*)?
/run/ipa_memcached(/.*)?
root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp
π FILE CONTEXTS π
SELinux requires files to have an extended attribute to define the file type. it's like a little sticker on every file that says "hi, this is what I am" π·οΈβ¨
You can see the context of a file using the -Z option to ls. yes, -Z yet again. she really is that girl.
Policy governs the access confined processes have to these files. SELinux memcached policy is very flexible allowing users to setup their memcached processes in as secure a method as possible.
STANDARD FILE CONTEXT
SELinux defines the file context types for the memcached. 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. two steps, no skipping π
semanage fcontext -a -t memcached_exec_t '/srv/memcached/content(/.*)?'
restorecon -R -v /srv/mymemcached_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex jumpscare but make it useful π§
The following file types are defined for memcached:
memcached_exec_t
- Set files with the
memcached_exec_ttype, if you want to transition an executable to thememcached_tdomain.
memcached_initrc_exec_t
- Set files with the
memcached_initrc_exec_ttype, if you want to transition an executable to thememcached_initrc_tdomain.
memcached_var_run_t
- Set files with the
memcached_var_run_ttype, if you want to store the memcached files under the/runor/var/rundirectory.
Paths:
/run/memcached(/.*)?, /run/ipa_memcached(/.*)?
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. sochconis the cute temporary tattoo andsemanage fcontextis the real full-send permanent ink, andrestoreconis the artist applying it π¨β¨
β‘ COMMANDS β‘
okay so here's your toolbox, bestie. these all play nice with the memcached policy:
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 whole GUI!! for when you want to click things instead of typing them π±οΈπ
π«Ά AUTHOR π«Ά
This manual page was auto-generated using sepolicy manpage. yeah, a machine wrote it. and now a teenager is rewriting the machine's work. it's giving full circle πβ¨
π SEE ALSO π
selinux(8)memcached(8)semanage(8)restorecon(8)chcon(1)sepolicy(8)setsebool(8)
and that's the whole page, bestie π this came to you from memcached, version dated 26-10-06, living under the manual name memcached_selinux(8) β go forth and label responsibly, ily, periodt ππ¦
π¦ 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