Skip to content

Commit

Permalink
adapted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Feb 1, 2019
1 parent 5ed7603 commit 0096cd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/installation/ssh_key.rb
Expand Up @@ -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
Expand Down

0 comments on commit 0096cd2

Please sign in to comment.