← All rules
SOCLE-CLD-FSP-010// File ownershipmediumfilesystem state

Verify Group Who Owns cron.daily

Ensures /etc/cron.daily, the directory of daily root-run cron scripts, is group-owned by root (gid 0).

Checked against a path’s metadata, mode, owner, group, SUID/SGID.

A pass proves✓ running now✓ on disk✓ survives rebootthe qualified verdict →
Debian 12CIS 1.1.0Debian 13CIS 1.0.0FedoraRHEL 10 / Rocky 10 / AlmaLinux 10RHEL 8 / Rocky 8 / AlmaLinux 8CIS 4.0.0RHEL 9 / Rocky 9 / AlmaLinux 9CIS 2.0.0Ubuntu 22.04CIS 3.0.0Ubuntu 24.04CIS 1.0.0Ubuntu 26.04
One check, maps to 3 standards

A mapping is a cross-reference to where each standard places this requirement, anchored and cross-validated, not a claim of equivalence. A passing check is evidence toward these references, how to read it.

Why this rule matters

/etc/cron.daily is a directory of scripts that cron runs as root every day. If its group owner is not root (gid 0), an unprivileged group could add, modify or replace a script and have it executed with root privileges on the next run, a direct and reliable privilege-escalation and persistence path.

What Pavois checks

Pavois reads the effective ownership of /etc/cron.daily from the inode (via stat) and asserts gid == 0. Checking the live inode catches drift from package updates or manual edits rather than trusting a template. The only_if guard skips the check when the directory is absent.

only_if { file('/etc/cron.daily').exist? }
describe file('/etc/cron.daily') do
  its('gid') { should eq 0 }
end

How to verify it is applied

Run stat -c '%G %g' /etc/cron.daily. Expected output: root 0. To audit contained scripts: find /etc/cron.daily ! -group root. If the directory does not exist the control is skipped.

Inspect & investigate

Ownership changes are not logged by default. Inspect with ls -ld /etc/cron.daily or stat /etc/cron.daily. With an auditd watch (auditctl -w /etc/cron.daily -p wa), chown events appear in /var/log/audit/audit.log. Daily job execution is visible in journalctl -u cron (Debian) or journalctl -u crond (RHEL).

Remediation

No automated harden plan is defined for this rule yet, so it must be applied manually: run chgrp root /etc/cron.daily (or chown :root /etc/cron.daily) to restore the root group owner; consider chgrp -R root /etc/cron.daily to cover the scripts inside.

Pavois applies this with its own harden engine, the plan below, not a shell script:

grouproot
path/etc/cron.daily
resourcefile
pavois harden plan local

where the target is local, a user@host SSH alias, or a container , Docs

Impact & precautions

A wrong group owner on /etc/cron.daily lets an unprivileged group drop a root-executed script, enabling privilege escalation and persistence. Precautions: restoring root group ownership is safe and does not affect existing legitimate jobs. Verify no package or configuration manager will revert it; review the directory contents for any already-planted scripts before re-securing.

Standards mapping

StandardReferenceTypeVersionConfidence
CIS2.2.6, 2.4.1.4directper OS, see the benchmark tablehigh
NISTAC-6(1), CM-6(a)supporting800-53 Rev 5 · 800-171 Rev 2 (pinned)medium
PCI DSS2.2.6supporting4.0.1medium

Each reference is a cross-reference anchored in the upstream benchmark and cross-validated against the SCAP Security Guide and ansible-lockdown, not a claim of equivalence. Direct = a prescriptive, line-level requirement; supporting = an abstract control family (NIST) the check provides evidence toward. How to read a mapping.

Sources & references