Method: Specinfra::Command::Openbsd::Base::File.check_is_owned_by
- Defined in:
- lib/specinfra/command/openbsd/base/file.rb
permalink .check_is_owned_by(file, owner) ⇒ Object
[View source]
20 21 22 23 |
# File 'lib/specinfra/command/openbsd/base/file.rb', line 20 def check_is_owned_by(file, owner) regexp = "^#{owner}$" "stat -f %Su #{escape(file)} | grep -- #{escape(regexp)}" end |