← Rules Catalog
mediumfilesystemunverified

Ensure all local files and directories have a valid group owner

files-valid-group-owner · RHEL ≥ 8 · 1 impl

Description

All local files and directories must be group-owned by a group present in /etc/group. Files with no valid group owner may be left behind by deleted groups or improperly installed software and should be investigated.

Rationale

A file without a valid group owner (an orphaned GID) can be inadvertently granted to a newly created group that reuses the GID, exposing its contents to an unintended set of users.

Check → Remediate

Checkcommand
df --local -P 2>/dev/null | awk 'NR!=1{print $6}' | xargs -I{} find {} -xdev -nogroup 2>/dev/null | head -1 | grep -q . && exit 1 || exit 0
expected_exit:
0
Remediatemanual
note:
Review files and directories without a valid group owner and assign an appropriate group, or remove them if no longer needed: find / -xdev -nogroup For each result, either set a valid group: chgrp <group> <file> or delete the orphaned file after confirming it is not required.

Framework references

STIG

V-281074 / RHEL-10-400285V-257930 / RHEL-09-232250V-230327 / RHEL-08-010790

NIST 800-53

CM-6
#permissions#ownership#group#audit#stig