Class: Specinfra::Command::Redhat::Base::File

Inherits:
Linux::Base::File show all
Defined in:
lib/specinfra/command/redhat/base/file.rb

Class Method Summary collapse

Methods inherited from Linux::Base::File

check_attribute, check_is_immutable, get_selinuxlabel

Methods inherited from Base::File

change_group, change_mode, change_owner, check_contains, check_contains_lines, check_contains_with_fixed_strings, check_contains_with_regexp, check_contains_within, check_exists, check_has_mode, check_is_block_device, check_is_character_device, check_is_directory, check_is_file, check_is_grouped, check_is_link, check_is_linked_to, check_is_mounted, check_is_owned_by, check_is_pipe, check_is_socket, check_is_symlink, copy, create_as_directory, download, get_content, get_link_target, get_md5sum, get_mode, get_mtime, get_owner_group, get_owner_user, get_sha256sum, get_size, link_to, move, remove

Methods inherited from Base

create, escape

Class Method Details

.check_is_accessible_by_user(file, user, access) ⇒ Object



3
4
5
6
# File 'lib/specinfra/command/redhat/base/file.rb', line 3

def check_is_accessible_by_user(file, user, access)
  # Redhat-specific
  "runuser -s /bin/sh -c \"test -#{access} #{file}\" #{user}"
end