Merge pull request #1269 from Tagadda/patch-1

[fix] set .ssh folder permissions to 600
This commit is contained in:
Alexandre Aubin 2021-07-11 16:11:46 +02:00 committed by GitHub
commit d4492afdc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,6 +64,7 @@ def user_ssh_add_key(username, key, comment):
parents=True, parents=True,
uid=user["uid"][0], uid=user["uid"][0],
) )
chmod(os.path.join(user["homeDirectory"][0], ".ssh"), 0o600)
# create empty file to set good permissions # create empty file to set good permissions
write_to_file(authorized_keys_file, "") write_to_file(authorized_keys_file, "")