salt icon indicating copy to clipboard operation
salt copied to clipboard

Option to preserve file permission mask from master

Open dcolish opened this issue 14 years ago • 7 comments

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.

dcolish avatar Mar 28 '12 19:03 dcolish

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 avatar Mar 28 '12 19:03 thatch45

@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?

SEJeff avatar Mar 28 '12 19:03 SEJeff

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

thatch45 avatar Mar 28 '12 19:03 thatch45

This is feature would be highly useful together with the file.recurse state.

tweenk avatar Feb 02 '14 18:02 tweenk

@thatch45 - is this feature still in the works? Or has it been implemented?

ssgward avatar Aug 11 '15 20:08 ssgward

@ssgward This has not been implemented.

cachedout avatar Aug 11 '15 20:08 cachedout

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

UtahDave avatar Jan 03 '17 19:01 UtahDave