Skip to content

Instantly share code, notes, and snippets.

@adamrb
Created July 8, 2013 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamrb/5952012 to your computer and use it in GitHub Desktop.
Save adamrb/5952012 to your computer and use it in GitHub Desktop.
Puppet recursive directory permission hack
exec { "${instance_dir}_perms":
command => "chmod -R 651 \"$instance_dir\"",
unless => "find \"$instance_dir\" -not -perm 651 | wc -l | grep -q '^0$'",
path => '/bin:/usr/bin:/sbin:/usr/sbin',
require => Acl["$instance_dir"],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment