User .ssh directory should be executable

This commit is contained in:
tituspijean 2023-04-12 09:54:52 +02:00 committed by GitHub
parent e14a12272d
commit 109375c83f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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