Sha256: 28b4aec54e5a46d6e7f22caedd47cc7e5e5c364d03a05ea888ae8165e6d2cea2

Contents?: true

Size: 631 Bytes

Versions: 121

Compression:

Stored size: 631 Bytes

Contents

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

Version data entries

121 entries across 121 versions & 1 rubygems

Version Path
specinfra-2.91.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.90.1 lib/specinfra/command/aix/base/file.rb
specinfra-2.90.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.89.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.88.2 lib/specinfra/command/aix/base/file.rb
specinfra-2.88.1 lib/specinfra/command/aix/base/file.rb
specinfra-2.88.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.87.2 lib/specinfra/command/aix/base/file.rb
specinfra-2.87.1 lib/specinfra/command/aix/base/file.rb
specinfra-2.87.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.86.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.85.1 lib/specinfra/command/aix/base/file.rb
specinfra-2.85.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.84.1 lib/specinfra/command/aix/base/file.rb
specinfra-2.84.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.83.4 lib/specinfra/command/aix/base/file.rb
specinfra-2.83.3 lib/specinfra/command/aix/base/file.rb
specinfra-2.83.2 lib/specinfra/command/aix/base/file.rb
specinfra-2.83.1 lib/specinfra/command/aix/base/file.rb
specinfra-2.83.0 lib/specinfra/command/aix/base/file.rb