Option to preserve file permission mask from master
It would be nice if a file's permission mask data was shipped over to the minions so that users could have the option of preserving it or changing it. I'm not sure which would be the most sensible default.
This has come up a few times, really don't like the idea of enforcing file perms on the minion based on what they are on the master, I think this will make things confusing and encourage people to cut dangerous corners with states.
If anyone has some opinions to present on this please do so. As you all know, I can be swayed
@thatch45 For users coming from config management systems like slack (glorified rsync -p) or who have a large amount of files to manage, this does make sense. It seems like a fringe feature, but one that would be "nice to have". Would you object if you didn't implement it?
I think I am fine with it, but only if it is turned off by default, so only if it is enabled on the master would the data be sent with the file data.
The way to do this would be to send the file stat data with the first file chunk that is sent out (loc = 0) and have the client evaluate the state data and enforce it if it is there
This is feature would be highly useful together with the file.recurse state.
@thatch45 - is this feature still in the works? Or has it been implemented?
@ssgward This has not been implemented.
This has been added with the file.recurse state. https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.recurse
PR here: https://github.com/saltstack/salt/pull/34807