File Modes


File modes should be represented as 4 digits rather than 3, to explicitly show that they are octal values. File modes can also be represented symbolically e.g. u=rw,g=r (style guide).

What you have done

file { '/tmp/foo':
  mode => '666',
}

What you should have done:

file { '/tmp/foo':
  mode => '0666',
}

Disabling the check

To disable this check you can add --no-file_mode-check to your puppet-lint command line.

$ puppet-lint --no-file_mode-check path/to/file.pp

Alternatively, if you’re calling puppet-lint via the Rake task, you should insert the following line to your Rakefile.

PuppetLint.configuration.send('disable_file_mode')