Skip to content

Conversation

malaupa
Copy link

@malaupa malaupa commented Jul 5, 2023

This PR introduces the use of syscall.SysProcAttr.Credential to set uid and gid. These values are queried using os/user.Lookup with a given username.

It would be nice to have this option available, for instance, file operations with different user context than root is often necessary.

@adnanh
Copy link
Owner

adnanh commented Apr 16, 2024

Hey, thank you for your contribution! This should already be possible to achieve using the -setuid and -setgid flags.

@jleroy
Copy link
Contributor

jleroy commented Aug 22, 2025

-setuid and -setgid are global flags which apply to all hooks.
It would be nice to be able to configure different users for different hooks.

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

Successfully merging this pull request may close these issues.

3 participants