本文介绍了为远程命令设置umask的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过ssh引导在远程计算机上启动的进程以某个umask运行?我希望这也适用于作为标准Capistrano配方的一部分运行的命令,所以我不能只对命令的 umask部分进行显式调用。

How can I direct processes started on remote machines via ssh to run with a certain umask? I want this to apply to commands run as part of standard Capistrano recipes too, so I can't just make an explicit call to "umask" part of the command.

似乎没有用Capistrano调用远程命令的方式读取远程计算机上的〜/ .bash_profile。

It does not appear that ~/.bash_profile on the remote machine is read, with the way that Capistrano invokes remote commands.

推荐答案

我遇到了相同的问题,并通过使用 config / deploy.rb SSHKit.config.umask 解决了这个问题。 c $ c>。请注意,这将为每个ssh命令设置 umask

I was confronted to the same issue and got around it by using the then-undocumented SSHKit.config.umask in config/deploy.rb. Note that this will set the umask for every ssh command.

这篇关于为远程命令设置umask的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 09:49