From: Faiyaz Ahmed Date: Sat, 26 Jul 2008 02:49:30 +0000 (+0000) Subject: Change ownership of authorized_keys after writing X-Git-Tag: NodeManager-1.7-22~2 X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=commitdiff_plain;h=0b6c6aa308120b519e9ad4e9c9fc1e34c5ff3358 Change ownership of authorized_keys after writing --- diff --git a/accounts.py b/accounts.py index efac0ad..012c040 100644 --- a/accounts.py +++ b/accounts.py @@ -90,6 +90,7 @@ class Account: os.chmod(dot_ssh, 0700) tools.write_file(dot_ssh + '/authorized_keys', lambda f: f.write(new_keys)) logger.verbose('%s: installing ssh keys' % self.name) + os.chown(dot_ssh + '/authorized_keys', pwd.getpwnam(self.name)[2], 504) def start(self, delay=0): pass def stop(self): pass