Skip to content

Commit 03af59c

Browse files
committed
[Directories] Set /etc permissions to 0755.
This is the default permission in Linux, but it was unintentionally changed in Rocky9.4 (https://forums.rockylinux.org/t/changed-permissions-on-etc-in-rl9-4-genericcloud-image/14449) breaking Munge, which requires the folder to be 0755. Signed-off-by: Giacomo Marciani <[email protected]>
1 parent b00a0c6 commit 03af59c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

cookbooks/aws-parallelcluster-platform/recipes/install/directories.rb

+10
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,13 @@
2929
mode '1777'
3030
recursive true
3131
end
32+
33+
# The default permission for directory /etc is 0755.
34+
# However, in Rocky9.4 it was unintentionally changed to 0777,
35+
# causing issues with Munge, that fails to start if /etc has group-writable permission without sticky bit.
36+
# See https://forums.rockylinux.org/t/changed-permissions-on-etc-in-rl9-4-genericcloud-image/14449
37+
directory '/etc' do
38+
owner 'root'
39+
mode '0755'
40+
recursive false
41+
end

cookbooks/aws-parallelcluster-platform/spec/unit/recipes/directories_spec.rb

+8
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@
4343
recursive: true
4444
)
4545
end
46+
47+
it 'sets permission 0755 for /etc' do
48+
is_expected.to create_directory('/etc').with(
49+
owner: 'root',
50+
mode: '0755',
51+
recursive: false
52+
)
53+
end
4654
end
4755
end
4856
end

0 commit comments

Comments
 (0)