5.4.10 Ensure default user umask is 077

Information

The operating system must set the umask value to 077 for all local interactive user accounts.

Rationale:

The umask controls the default access mode assigned to newly created files. A umask of 077 limits new files to mode 700 or less permissive. Although umask can be represented as a four-digit number, the first digit representing special access modes is typically ignored or required to be '0'. This requirement applies to the globally configured system defaults and the local interactive user defaults for each account on the system.

Solution

Remove the umask statement from all local interactive user's initialization files.
Using the list collected in the audit run the following command on all the files located with a less restrictive umask:

user@server# ~]$ echo 'umask 077' [] /home/user/path_to_file

If the account is for an application, the requirement for a umask less restrictive than 077 can be documented, but the user agreement for access to the account must specify that the local interactive user must log on to their account first and then switch the user to the application account with the correct option to gain the account's environment variables.

Notes:

This Benchmark recommendation maps to:

Red Hat Enterprise Linux 7 Security Technical Implementation Guide:

Version 2, Release: 3 Benchmark Date: 26 Apr 2019



Vul ID: V-72049

Rule ID: SV-86673r2_rule

STIG ID: RHEL-07-021040

Severity: CAT II

See Also

https://workbench.cisecurity.org/files/2688

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-3(4)(d)

Plugin: Unix

Control ID: 52bc72ee75f3fea692861e5db20b8d0f5af7a8fd8cbe4a45deba90430a99a290