-
Notifications
You must be signed in to change notification settings - Fork 781
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 for setting file ownership #461
Comments
Hi @blalor The problem is that the |
I also don't believe there's currently a cross platform way to figure out the gid by passing a group name as a string until Go 2.0 - unless I've missed it. On Linux you could parse the |
Closing due to lack of response and technical limitations. |
Would using the os/user package (https://golang.org/pkg/os/user/) when available be workable? |
Might be nice to at least mention something about it in the docs. Perhaps even suggest some options, such as:
|
@SunSparc I don't see how the option: "touch the file with correct ownership before handing it to consul-template" works? Because as soon as Consul template updates the file it will change the permissions to its own UID and GID. It seems Consul template doesn't update the file; It deletes it and creates it. |
@siepkes I just double-checked and you are correct. And that is really just a side note anyway. The point of my comment was that it would really be nice if this was addressed in the documentation. |
Hi all, Consul template preserves the file ownership if the existing file is there. It also supports specifying file permissions in the configuration via the 'perms' argument. Are you seeing different behavior? If so, could you please open a new issue and complete the issue template that pops up? This is a very old issue and a lot has changed in CT since it was created. It would be very helpful to have configuration and debug output to try and reproduce this. Thanks! |
The issue of setting file permissions was Initially brought up in #358 and resolved in #415, but #358 also mentioned setting the ownership of a file. Obviously that's only possible when running as root, but I have a case where I need to do exactly this. Is there a reason that support wasn't added?
The text was updated successfully, but these errors were encountered: