fix permissions on /etc/sudoers.d file to be 0440 not 0644
sudo complains about the permissions on the sudoers config file that cloud-init writes: [ec2-user@ip-10-166-110-107 ~]$ sudo -s sudo: /etc/sudoers.d/90-cloud-init-users is mode 0644, should be 0440 This patch makes the file's permissions match sudo's recommendation. Note: ubuntu's sudo doesn't seem to complain about 644, but 440 is probably better.
This commit is contained in:
commit
faba64a314
@ -339,7 +339,7 @@ class Distro(object):
|
||||
content += "\n"
|
||||
|
||||
if not os.path.exists(sudo_file):
|
||||
util.write_file(sudo_file, content, 0644)
|
||||
util.write_file(sudo_file, content, 0440)
|
||||
|
||||
else:
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user