1

I'm trying to run a test command with SSHKit.config.umask configured:

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

I expect hello.txt to be configures with no permissions, but I see:

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

What am I doing wrong?

Kurt Mueller
  • 3,173
  • 2
  • 29
  • 50
robd
  • 9,646
  • 5
  • 40
  • 59

1 Answers1

1

I needed to use the following syntax to that the command was executed via the command map:

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

Now the permissions are correct:

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

robd
  • 9,646
  • 5
  • 40
  • 59