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

Setting user & group appears not to be implemented! #190

Closed
srd424 opened this issue Jan 24, 2025 · 1 comment · Fixed by #192
Closed

Setting user & group appears not to be implemented! #190

srd424 opened this issue Jan 24, 2025 · 1 comment · Fixed by #192
Labels
bug Something isn't working

Comments

@srd424
Copy link
Contributor

srd424 commented Jan 24, 2025

Describe the bug

I've tried to set the user, group and mode on some files in /etc. The mode is set correctly but the uid/gid are not. Looking at the source it appears this has never been implemented?

To Reproduce

"ssl/private/ssl-cert-snakeoil.key" = {
   source = ./etc/ssl-cert-snakeoil.key;   user = "root";
   group = "ssl-cert"; mode = "0640"; };

Leads to:

# ls -l /etc/ssl/private/ssl-cert-snakeoil.key
-rw-r----- 1 root root     1704 Jan 24 18:11 /etc/ssl/private/ssl-cert-snakeoil.key

Expected behavior

# ls -l /etc/ssl/private/ssl-cert-snakeoil.key
-rw-r----- 1 root ssl-cert 1704 Jan 24 18:11 /etc/ssl/private/ssl-cert-snakeoil.key

System information

system-manager rev 196586a on Ubuntu 22.04.

@srd424 srd424 added the bug Something isn't working label Jan 24, 2025
@srd424
Copy link
Contributor Author

srd424 commented Jan 26, 2025

https://github.com/srd424/system-manager/tree/chown-v1 is a simple, inelegant solution to just setting the uids/gids. It probably needs to be done in copy_file instead to make the error handling more sensible. Also need to resolve user and group names at some point if those are used instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant