New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file.line with mode=delete does not preserve ownership of a file #38452
Comments
Thanks for reporting this. I have confirmed the problem, and it looks like we just don't maintain the ownership in the file.line execution function. I have tagged this as a bug for our platform team to take a look. Thanks, |
Can you verify if this is fixed in 2016.11.4? Thanks, |
No it's still not fixed. file.line still change ownership to root:root
|
Are you using the file.line execution module, or the state module? This should work in a state now, after this #39592 |
I'm using state module. There is the code:
38452.tmp
Run it:
After execution:
|
Nevermind, it does look like the first time this is run, it still changes the user back to the user and group that salt-minion is running as. On the second run, After the line is deleted, the user does get changed. |
Description of Issue/Question
If you use
file.line
withmode: delete
, if a successful deletion occurs, the ownership of the file is not preserved (but changes to root:root)Steps to Reproduce Issue
Use
file.line
withmode: delete
in a state file, and set it up to successfully delete at least one line in a file on the minion that is not owned by root. After the state has run, you will see that the file is now chowned root:root.Versions Report
2016.11.1 on both master and minion.
The text was updated successfully, but these errors were encountered: