-
Notifications
You must be signed in to change notification settings - Fork 783
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
Allow setting user/group ownership of template output #1531
Allow setting user/group ownership of template output #1531
Conversation
Related issues hashicorp#639, hashicorp#1497, hashicorp#1185 and also nomad/5020 Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
if the test user is not member of any group, we skip and log Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
Looks like a problem with the Windows build and the CI system doesn't like the Chown call, might be a mount time restriction on the /tmp directory. Maybe try using a local directory for it instead? |
- fix: leftover unused package - fix: removed troubleshooting t.Log("groups:"...) - fix: now we matrix test setting the flags Uid and Gid to -1 => noop Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
Hi @eikenb, I covered more cases and changed things a bit. It should work now. |
I also did some work on this issue recently but didn't find the time to open a PR yet unfortunately (no tests yet). My implementation supports setting a file owner/group and permission bits (converts octal permissions to ACL entries) on Windows as well. See master...lukas-w:f-file-owner. Maybe we can join efforts on this? |
Thanks for the prompt @3nprob, I'll take another look at this when I start work on 0.28.0 (should be soon, next in my project queue). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good. Thanks!
Sure, It's great to see this merged! Another difference in the two implementations though is that mine supports specifying |
Hey @lukas-w, If you'd like to open a PR I'll be happy to review it. |
Adds support for the
uid
andgid
entries in thetemplate
stanza that would ultimately be passed to aos.Chown
command.It obviously works only on POSIX and Windows is handled with graceful noop with a warning if the user set
uid
orgid
Related issues #639, #1497, #1185 and also nomad/5020
Signed-off-by: Alessandro De Blasis alex@deblasis.net