[fix] set .ssh folder permissions to 600

Fix YunoHost/issues#1770
This commit is contained in:
Tagada 2021-07-10 23:17:58 +02:00 committed by GitHub
parent 1c15f644f5
commit cc3c9dfcd7
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, "")