From 0096cd2ff829717ddafe16189eaab41184019e3a Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Fri, 1 Feb 2019 14:09:32 +0100 Subject: [PATCH] adapted changes --- src/lib/installation/ssh_key.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/installation/ssh_key.rb b/src/lib/installation/ssh_key.rb index b14385f58..68bad2611 100644 --- a/src/lib/installation/ssh_key.rb +++ b/src/lib/installation/ssh_key.rb @@ -47,14 +47,14 @@ def write_files(dir) files.each do |file| path = File.join(dir, file.filename) IO.write(path, file.content) - if file.filename =~ /^ssh_host_.*(key)$/ + if file.filename =~ /^ssh_host_.*key$/ # ssh deamon accepts only private keys with restricted # file permissions. log.info("Set permissions of #{file.filename} to 0o600") File.chmod(0o600, path) else # Taking already given permissions - log.info("Set permissions of #{file.filename} to #{file.permissions.to_s(8)}") + log.info("Set permissions of #{file.filename} to 0o#{file.permissions.to_s(8)}") File.chmod(file.permissions, path) end end