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

Support to define the owner and the group of the destination file #639

Closed
luisbosque opened this issue May 18, 2016 · 4 comments
Closed
Milestone

Comments

@luisbosque
Copy link

Currently consul-template supports setting the permissions of the destination file.
It would be great to be able to set the owner and group of it too. This would allow great flexibility without the need to run consul-template as the user that will be owner of the destination file.

Is this not implemented because any special reason or just because nobody needed in the past? I can try to send a PR with owner/group support if it's an acceptable feature.

@luisbosque
Copy link
Author

Ok, I've found this issue where this feature is discarded:
#461

@sethvargo
Copy link
Contributor

@luisbosque

Thank you for opening an issue. The problem is that there's really no cross-platform way to do this, and creating the file in advance will preserve the existing permissions so there's a good workaround. Keep in mind we support Windows, bsd, and more, so we need a fully-bc thing. If you can come up with a good PR for that, I'd be happy to review! Thanks! 😄

@njhartwell
Copy link

@sethvargo It looks like the current implementation does not preserve or copy the user/group attributes from an existing destination file. 👍 for built-in support for this (at least on *nix, if nothing else).

@ryancurrah
Copy link

Yes I was hoping it would preserve user/group when copying a file but it does not. Also running a command chown then restart doesnt work either it runs chown but fails to restart.

deblasis added a commit to deblasis/consul-template that referenced this issue Nov 3, 2021
Related issues hashicorp#639, hashicorp#1497, hashicorp#1185 and also nomad/5020

Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
@eikenb eikenb added this to the v0.28.0 milestone Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants