Skip to content

Commit d17e5b5

Browse files
authored
Merge pull request #14609 from ggbecker/change-file-permissions-text
Ensure dot files permissions are 0740 or less (remove only offending bits)
2 parents 61106d7 + 34effa6 commit d17e5b5

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

  • linux_os/guide/system/accounts/accounts-session
    • file_permission_user_init_files_root
    • file_permission_user_init_files

linux_os/guide/system/accounts/accounts-session/file_permission_user_init_files/rule.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ documentation_complete: true
44
title: 'Ensure All User Initialization Files Have Mode 0740 Or Less Permissive'
55

66
description: |-
7-
Set the mode of the user initialization files to <tt>0740</tt> with the
7+
Set the mode of the user initialization files to <tt>0740</tt> or less permissisive with the
88
following command:
9-
<pre>$ sudo chmod 0740 /home/<i>USER</i>/.<i>INIT_FILE</i></pre>
9+
<pre>$ sudo chmod u-s,g-wxs,o= /home/<i>USER</i>/.<i>INIT_FILE</i></pre>
1010
1111
rationale: |-
1212
Local initialization files are used to configure the user's shell environment
@@ -41,10 +41,10 @@ ocil: |-
4141
There should be no output.
4242
4343
fixtext: |-
44-
Set the mode of the local initialization files to "0740" with the following command:
44+
Set the mode of the local initialization files to "0740" or less permissive with the following command:
4545
4646
Note: The example will be for the smithj user, who has a home directory of "/home/smithj".
4747
48-
$ sudo chmod 0740 /home/smithj/.
48+
$ sudo chmod u-s,g-wxs,o= /home/smithj/.<i>INIT_FILE</i>
4949
5050
srg_requirement: 'All {{{ full_name }}} local initialization files must have mode 0740 or less permissive.'

linux_os/guide/system/accounts/accounts-session/file_permission_user_init_files_root/rule.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ title: 'Ensure All User Initialization Files Have Mode 0740 Or Less Permissive'
44

55
description: |-
66
Set the mode of the user initialization files, including the <tt>root</tt> user,
7-
to <tt>0740</tt> with the following commands:
7+
to <tt>0740</tt> or less permissisive with the following commands:
88
<pre>
9-
$ sudo chmod 0740 /root/.<i>INIT_FILE</i>
10-
$ sudo chmod 0740 /home/<i>USER</i>/.<i>INIT_FILE</i>
9+
$ sudo chmod u-s,g-wxs,o= /root/.<i>INIT_FILE</i>
10+
$ sudo chmod u-s,g-wxs,o= /home/<i>USER</i>/.<i>INIT_FILE</i>
1111
</pre>
1212
1313
rationale: |-
@@ -34,10 +34,10 @@ ocil: |-
3434
There should be no output.
3535
3636
fixtext: |-
37-
Set the mode of the local initialization files to "0740" with the following command:
37+
Set the mode of the local initialization files to "0740" or less permissive with the following command:
3838
3939
Note: The example will be for the smithj user, who has a home directory of "/home/smithj".
4040
41-
$ sudo chmod 0740 /home/smithj/.
41+
$ sudo chmod u-s,g-wxs,o= /home/smithj/.<i>INIT_FILE</i>
4242
4343
srg_requirement: 'All {{{ full_name }}} local initialization files must have mode 0740 or less permissive.'

0 commit comments

Comments
 (0)