File Permissions

This assertion type verifies the permissions of a file. It helps you to quickly check expected permission sets.

Expecting

This type checks if the file has 775 permissions.

file_permission:
    - name: "My File has 775"
      file: "/var/www/my-file.txt"
      expected: "775"

Not Expecting

Use this type to verify that the file does not have 775 permissions.

file_permission:
    - name: "My File has not 775"
      file: "/var/www/my-file.txt"
      not_expected: "775"

Last updated