/usr/lib/ruby/vendor_ruby/specinfra/command/aix/base/file.rb is in ruby-specinfra 2.66.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | class Specinfra::Command::Aix::Base::File < Specinfra::Command::Base::File
class << self
def check_is_accessible_by_user(file, user, access)
"su -s sh -c \"test -#{access} #{file}\" #{user}"
end
def check_has_mode(file, mode)
"find #{file} -prune -perm #{mode} | grep ^#{file}$"
end
def check_is_owned_by(file, owner)
regexp = "^#{owner}$"
"ls -al #{escape(file)} | awk '{print $3}' | grep -- #{escape(regexp)}"
end
def check_is_grouped(file, group)
regexp = "^#{group}$"
"ls -al #{escape(file)} | awk '{print $4}' | grep -- #{escape(regexp)}"
end
end
end
|