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

Verify Group Who Owns /etc/at.deny file

Ensures /etc/at.deny, the list of users denied use of the at scheduler, 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 1 standard

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/at.deny lists the users forbidden from scheduling jobs with at. If its group owner is not root (gid 0), a non-privileged group could edit the file to remove its own entry and regain access to the at scheduler, defeating the deny list.

What Pavois checks

Pavois reads the effective ownership of /etc/at.deny from the inode (via stat) and asserts gid == 0. This reflects the real on-disk state at scan time rather than a configuration template's intent, catching ownership drift from package updates or manual edits. Many hardened systems prefer an allow-list and delete at.deny; the only_if guard skips the check when the file is absent.

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

How to verify it is applied

Run stat -c '%G %g' /etc/at.deny. Expected output: root 0. If the file does not exist the control is skipped.

Inspect & investigate

Ownership changes are not logged by default. Inspect with ls -l /etc/at.deny or stat /etc/at.deny. With an auditd watch (auditctl -w /etc/at.deny -p wa), chown events surface in /var/log/audit/audit.log.

Remediation

No automated harden plan is defined for this rule yet, so it must be applied manually: run chgrp root /etc/at.deny (or chown :root /etc/at.deny) to restore the root group owner.

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

commandtest -e /etc/at.deny && { chown root:root /etc/at.deny; chmod 0640 /etc/at.deny; }; true
nameat-deny-perms
not_if! test -e /etc/at.deny
resourceexec
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/at.deny lets an unprivileged group edit the deny list and bypass the restriction. Precautions: restoring the root group is low-risk and does not change who is currently denied; verify no configuration manager will revert it. On allow-list-based setups, consider removing at.deny entirely rather than relying on it.

Standards mapping

StandardReferenceTypeVersionConfidence
CIS2.4.2.1directper OS, see the benchmark tablehigh

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