Fixed: Errno::ENOENT: No such file or directory - /share/tmp
This commit is contained in:
parent
962d8edd52
commit
013bbde7d5
|
@ -21,9 +21,7 @@ class KeyPair < ActiveRecord::Base
|
|||
protected
|
||||
|
||||
def check_keys
|
||||
tmp = "#{APP_CONFIG['root_path']}/tmp"
|
||||
system "sudo chown `whoami` #{tmp} && chmod 1777 #{tmp}"
|
||||
dir = Dir.mktmpdir('keys-', tmp)
|
||||
dir = Dir.mktmpdir('keys-', '/tmp')
|
||||
begin
|
||||
%w(pubring secring).each do |kind|
|
||||
filename = "#{dir}/#{kind}"
|
||||
|
|
|
@ -22,7 +22,7 @@ class SshKey < ActiveRecord::Base
|
|||
def set_fingerprint
|
||||
return false unless key
|
||||
|
||||
file = Tempfile.new('key_file', "#{APP_CONFIG['root_path']}/tmp")
|
||||
file = Tempfile.new('key_file', '/tmp')
|
||||
filename = file.path
|
||||
begin
|
||||
file.puts key
|
||||
|
|
Loading…
Reference in New Issue