3.6 Ensure no files or directories without an owner and a group exist

Information

Administrators may delete users or groups from the system and neglect to remove all files and/or directories owned by those users or groups.

A new user or group who is assigned a deleted user's user ID or group ID may then end up "owning" a deleted user or group's files, and thus have more access on the system than was intended.

Solution

Set ownership and group ownership of these files and/or directories to an active user on the system:

# /usr/bin/chown <owner> <file>
# /usr/bin/chgrp <group> <file>

- OR -

Remove the file/directory:

# [[ -f <file> ]] && /usr/bin/rm -f <file>
# [[ -d <file> ]] && /usr/bin/rmdir <file>

See Also

https://workbench.cisecurity.org/benchmarks/22751

Item Details

Category: ACCESS CONTROL, MEDIA PROTECTION

References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|MP-2, CSCv7|14.6

Plugin: Unix

Control ID: e3949c3ff5e35eda610ca3d70459fc75e75059a8ff9d5e67e21721515a277ff0