Skip to content

proc-hidepid.service: Fixing Systemd related issues #208

@wryMitts

Description

@wryMitts

This is the script I use to prevent failures on startup when using proc-hidepid.service

I've had this configuration running for over a year now on a server host system, and a slew of server VMs. This is not tested on desktop systems.

sudo groupadd proc
mkdir -p /etc/systemd/system/proc-hidepid.service.d/
echo "[Service]
ExecStart=/bin/mount -o remount,nosuid,nodev,noexec,hidepid=2,gid=proc /proc
" > /etc/systemd/system/proc-hidepid.service.d/override.conf
 
mkdir -p /etc/systemd/system/systemd-logind.service.d/
echo "[Service]
SupplementaryGroups=proc" > /etc/systemd/system/systemd-logind.service.d/override.conf

mkdir -p /etc/systemd/system/user@.service.d/
echo "[Service]
SupplementaryGroups=proc" > /etc/systemd/system/user@.service.d/override.conf

Issues caused without this configuration, and said fixes, are mentioned here:
systemd/systemd#12955

I am unaware of exactly what security impact this may have, but it stops services from failing when booting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions