summaryrefslogtreecommitdiff
path: root/morphlib/exts
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2013-05-09 23:04:48 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2013-05-09 23:04:48 +0000
commit79a5dc7709dc27e72db094c59edf0a7d42177e62 (patch)
tree3623479d53a9d71e72b6976a125a7e1ff8116f5a /morphlib/exts
parent20770245c364714b39c3a2eca8fca478ccc765fa (diff)
downloadmorph-79a5dc7709dc27e72db094c59edf0a7d42177e62.tar.gz
Fix permissions on the ssh configure extension
Diffstat (limited to 'morphlib/exts')
-rwxr-xr-xmorphlib/exts/ssh.configure6
1 files changed, 4 insertions, 2 deletions
diff --git a/morphlib/exts/ssh.configure b/morphlib/exts/ssh.configure
index 55fbbb30..2f3167e7 100755
--- a/morphlib/exts/ssh.configure
+++ b/morphlib/exts/ssh.configure
@@ -111,10 +111,12 @@ class SshConfigurationExtension(cliapp.Application):
for key in keys:
shutil.copy(key, dest)
- os.chmod(dest, 0600)
+ path = os.path.join(dest, os.path.basename(key))
+ os.chmod(path, 0600)
for key in pubkeys:
shutil.copy(key, dest)
- os.chmod(dest, 0644)
+ path = os.path.join(dest, os.path.basename(key))
+ os.chmod(path, 0644)
def copy_rename_keys(self, keys, pubkeys, dest, new, snip):
'''Copies SSH keys to new VM and renames them'''