For an cookbook I'm creating, I have a recipe for both installing and upgrading.
In the install recipe I'm creating a directory and set some permissions:
directory directory do
In the upgrade recipe I need to check if the permissions is still the same. What would be the best way to check the permissions of a folder in Chef? (Note: for Centos/RHEL).
I plan to check the permissions in the start of the recipe, as this will need to be investigated if there is a mismatch. It would also be nice to return a custom error message if the permission have changed.
Thanks in advance!