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
|
protected
|
||||||
|
|
||||||
def check_keys
|
def check_keys
|
||||||
tmp = "#{APP_CONFIG['root_path']}/tmp"
|
dir = Dir.mktmpdir('keys-', '/tmp')
|
||||||
system "sudo chown `whoami` #{tmp} && chmod 1777 #{tmp}"
|
|
||||||
dir = Dir.mktmpdir('keys-', tmp)
|
|
||||||
begin
|
begin
|
||||||
%w(pubring secring).each do |kind|
|
%w(pubring secring).each do |kind|
|
||||||
filename = "#{dir}/#{kind}"
|
filename = "#{dir}/#{kind}"
|
||||||
|
|
|
@ -22,7 +22,7 @@ class SshKey < ActiveRecord::Base
|
||||||
def set_fingerprint
|
def set_fingerprint
|
||||||
return false unless key
|
return false unless key
|
||||||
|
|
||||||
file = Tempfile.new('key_file', "#{APP_CONFIG['root_path']}/tmp")
|
file = Tempfile.new('key_file', '/tmp')
|
||||||
filename = file.path
|
filename = file.path
|
||||||
begin
|
begin
|
||||||
file.puts key
|
file.puts key
|
||||||
|
|
Loading…
Reference in New Issue