Skip to content
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

fix issue with ownership when perms option is set #1473

Merged
merged 1 commit into from
May 27, 2021

Conversation

eikenb
Copy link
Contributor

@eikenb eikenb commented May 26, 2021

When the template config option perms is set, the ownership isn't preserved. The problem was the file ownership is preserved in the block that is only run if perms is unset. Ownership should always be preserved.

Note there is no tests as ownership changes are hard/impossible to do cross system. Groups, which you could set, vary to much between systems to make this feasible.

Fixes #1379

@eikenb eikenb added the bug label May 26, 2021
@eikenb eikenb added this to the 0.26.0 milestone May 26, 2021
@eikenb eikenb requested a review from a team May 26, 2021 23:46
Copy link
Contributor

@findkim findkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting bug, glad you were able to reproduce it. The changes look good 👍

When the template config option `perms` is set, the ownership isn't
preserved. The problem was the file ownership is preserved in the block
that is only run if perms is unset. Ownership should always be preserved.
@eikenb eikenb force-pushed the issue-1379-preserve-ownership branch from bf93668 to 3943241 Compare May 27, 2021 20:45
@eikenb eikenb merged commit 6a0034d into master May 27, 2021
@eikenb eikenb deleted the issue-1379-preserve-ownership branch May 27, 2021 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

consul-template does not preserve user and group owners of existing destination file
2 participants