SV-268181r1131169_rule
V-268181
SRG-OS-000480-GPOS-00228
ANIX-00-002180
CAT II
10
Configure the NixOS operating system to change default file permissions so users may only modify their own files.
Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix:
security.loginDefs.settings.UMASK = "077";
Rebuild and switch to the new NixOS configuration:
$ sudo nixos-rebuild switch
Verify the NixOS operating system defines default file permissions so users may only modify their own files.
$ grep "UMASK" /etc/login.defs
UMASK 077
If the UMASK setting is not present, is commented out, or is less restrictive than 077, this is a finding.
V-268181
False
ANIX-00-002180
Verify the NixOS operating system defines default file permissions so users may only modify their own files.
$ grep "UMASK" /etc/login.defs
UMASK 077
If the UMASK setting is not present, is commented out, or is less restrictive than 077, this is a finding.
M
5658