mirror of
https://github.com/inspec/inspec
synced 2024-11-13 00:17:08 +00:00
updates file resource doc to add example for sticky bit with leading zero
Signed-off-by: Collin McNeese <cmcneese@chef.io>
This commit is contained in:
parent
8b5789004a
commit
78f9594839
1 changed files with 8 additions and 0 deletions
|
@ -117,6 +117,14 @@ not
|
|||
|
||||
{ should cmp '644' }
|
||||
|
||||
or:
|
||||
|
||||
{ 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