Class: SSHKit::Backend::NetsshGlobal
- Inherits:
-
Netssh
- Object
- Netssh
- SSHKit::Backend::NetsshGlobal
- Defined in:
- lib/sshkit/backends/netssh_global.rb
Defined Under Namespace
Classes: Configuration
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.config ⇒ Object
16 17 18 |
# File 'lib/sshkit/backends/netssh_global.rb', line 16 def config @config ||= Configuration.new end |
Instance Method Details
#upload!(local, remote, options = {}) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/sshkit/backends/netssh_global.rb', line 23 def upload!(local, remote, = {}) execute :setfacl, "-m u:#{ssh_user}:rwx #{File.dirname(remote)}; true" execute :setfacl, "-m u:#{ssh_user}:rw #{remote}; true" super as :root do # Required as uploaded file is owned by SSH user, not owner execute :chown, property(:owner), remote end end |