Merge pull request #1642 from YunoHost/fix-ssh-user

User .ssh directory should be executable
This commit is contained in:
Alexandre Aubin 2023-04-12 12:35:33 +02:00 committed by GitHub
commit 04edce8948
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, "")