How can I direct processes running on remote machines via ssh to start with a specific umask? I want this to apply to commands executed as part of the standard Capistrano recipes, so I cannot just make an explicit call to the umask part of the command.
It doesn’t work that ~ / .bash_profile is being read on the remote computer because Capistrano calls remote commands.
I ran into the same problem and circumvented it, then using undocumented SSHKit.config.umaskin config/deploy.rb. Note that for each ssh command is installed umask.
SSHKit.config.umask
config/deploy.rb
umask
umask 0002 .bashrc , .
Alain - umask .bashrc .bash_profile. Capistrano .bash_profile . .bashrc .bash_profile . , .bashrc, , , capistrano.
.bashrc
.bash_profile
- umask, . , Cap 3 :
task :set_umask do on roles(:all) do |host| execute "umask 0002" end end before "deploy:starting", "set_umask"
@beauby SSHKit , Capistrano 3, Capistrano 2 SSHKit.
umask Capistrano , bundle install . , Capistrano 2, , :
bundle install
namespace :bundle do task :postinstall do run "chmod -R u=rwX,go=rX #{bundle_dir}" end end after 'bundle:install', 'bundle:postinstall'
Source: https://habr.com/ru/post/1524576/More articles:Практическое использование (и повторное использование) положения КОНСТРУКТА - semanticsDifference between ApiController and IHttpController inheritance - c #Change document root using .htaccess on wamp - apacheНевозможно переименовать столбец временной таблицы - sqlGrails spring plugin for security kernel: how to remove browser prompt for ajax request - ajaxAccess to rescatter constants in Excel COM using Python and win32com - python-2.7Applet Error ClassNotFoundException; Rebooting works - javaPython documentation - pythonClassNotFoundException only if the JAR is signed - javaSupport for Android DialogFragment crashes when you rotate the screen - androidAll Articles