file.recurse file_mode: keep doesn't work with salt-ssh #67567
Replies: 9 comments
-
note that explicitly setting permissions with something like |
Beta Was this translation helpful? Give feedback.
-
I was just looking into this and the file.recurse state makes it was to calling file.manage in the execution module, which does says this:
|
Beta Was this translation helpful? Give feedback.
-
ahhh so maybe it needs a documentation note on the file.recursive state page to match that. but also, I assume the files are just getting SCP'd over, so I'm not sure why salt-ssh couldn't stat the files locally and apply those changes remotely, or even just use rsync if available. but that's definitely more into feature request territory. regardless, it'd be good to have a supported workaround for salt-ssh to do this without having to have like a thousand separate file entries to sync a whole dir. |
Beta Was this translation helpful? Give feedback.
-
At minimum, that information should bleed into the state page, I agree. As far as the implementation moving forward, I'll add a feature request to this until it gets investigated as to exactly why it is this way. |
Beta Was this translation helpful? Give feedback.
-
But there does need to be a separate PR to address the documentation. :) |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
-
Have same issue on salt. Even more, on salt-master i have another issue,
Same machine on salt-master:
With |
Beta Was this translation helpful? Give feedback.
-
Aren't the files transferred to the minion with SCP? In that case, would it not be as simple as adding the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description of Issue
When recursively copying a directory to a minion using the file.recurse state, when using the
file_mode: keep
options, permissions from the source host on files are not actually kept intact, despite documentation saying they will be:https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.recurse
Setup
Steps to Reproduce Issue
Use salt-ssh to apply the state to a remote system, watch as all files are created with 600 permissions instead of their source permissions.
Versions Report
Beta Was this translation helpful? Give feedback.
All reactions