mirror of
https://github.com/inspec/inspec
synced 2024-11-26 06:30:26 +00:00
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:
commit
109b03a63c
1 changed files with 8 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue