saltstack/salt — Issue #756: Add recursive ownership management to file.directory state
Author: archtaku
Created: 2012-02-25 06:48:29+00:00
State: open

My proposal is to add a "recurse" option to the file.directory state, like so:

/var/www/foo:
file:
- directory
- user: foo
- group: bar
- mode: 0755
- recurse:
- user
- group

As discussed on the mailing list, os.walk can be used to check all files/dirs under the designated directory for either user or group ownership (or both). Should any be found that do not match what is specified, a **chown -R** can be used to repair the permissions.

I should be able to hack away at this a bit over the weekend.