1

構成されたテストコマンドを実行しようとしていSSHKit.config.umaskます:

deploy.rb:

SSHKit.config.umask = '777'

deploy.rake

namespace :deploy do
  task :test do
    on roles :web do
      execute('touch ~/hello.txt')
    end
  end
end

hello.txtパーミッションなしで構成することを期待していますが、次のように表示されます。

-rw-rw-r-- 1 deploy deploy 0 Apr 9 15:40 hello.txt

私は何を間違っていますか?

4

1 に答える 1

1

コマンド mapを介してコマンドを実行するには、次の構文を使用する必要がありました。

execute(:touch, '~/hello.txt')

これで権限が正しくなりました:

---------- 1 deploy deploy 0 Apr 9 15:44 hello.txt

于 2015-04-09T15:59:05.823 に答える