← Rules Catalog
mediumfilesystemverified rollback-safe

Ensure library directories are group-owned by root

library-dirs-group · RHEL ≥ 8, UBUNTU ≥ 22 · 1 impl

Description

All shared library directories must be group-owned by root.

Rationale

Library directories group-owned by non-root accounts could allow group members to add malicious libraries. Root group ownership prevents this.

Check → Remediate

Checkcommand
find /lib /lib64 /usr/lib /usr/lib64 ! -group root -type d 2>/dev/null | head -1
Remediatefile_permissions
find_paths:
/lib, /lib64, /usr/lib, /usr/lib64
find_type:
d
find_args:
! -group root
group:
root

Framework references

STIG

V-281042 / RHEL-10-400125V-251709V-270700 / UBTU-24-300010V-260498 / UBTU-22-232065

NIST 800-53

AC-6CM-5

Live verification

rhel8:checkubuntu22:checkubuntu24:checkubuntu26:check
#file-permissions#library-files#security