Merge pull request #4823 from collinmcneese/cmcneese/docs/file-md

updates file resource doc to add example for sticky bit with leading …
This commit is contained in:
Miah Johnson 2020-01-14 13:06:52 -08:00 committed by GitHub
commit 109b03a63c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,6 +117,14 @@ not
{ should cmp '644' }
or write:
{ should cmp '01775' }
not
{ should cmp '1775' }
Without the zero prefix for the octal value, Chef InSpec will interpret it as the _decimal_ value 644, which is octal 1024 or `-----w-r-T`, and any test for a file that is `-rw-r--r--` will fail.
Note: see the [`be_more_permissive_than(mode)`](#be_more_permissive_than?(mode)) matcher for upper and lower bounds on file mode.