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

c8y-remote-access-plugin init using non-standard/non-root user #2886

Open
reubenmiller opened this issue May 20, 2024 · 0 comments
Open

c8y-remote-access-plugin init using non-standard/non-root user #2886

reubenmiller opened this issue May 20, 2024 · 0 comments
Assignees
Labels
improvement User value

Comments

@reubenmiller
Copy link
Contributor

reubenmiller commented May 20, 2024

Is your feature improvement request related to a problem? Please describe.

Running c8y-remote-access-plugin --init on a system which is using a non-standard user (e.g. anything other than "tedge") causes the following error.

c8y-remote-access-plugin --config-dir /opt/homebrew/etc/tedge --init
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:   × Failed to initialize c8y-remote-access-plugin. You have to run the command
  │ with sudo.
  ├─▶ Creating supported operations directory
  ╰─▶ User not found: "tedge".
', crates/core/tedge/src/main.rs:50:58

Describe the solution you'd like

If tedge init --user myuser --group mygroup can be run with a custom user, then c8y-remote-access-plugin --init should also not have a problem with it.

It might make sense just to create the file using the permissions of the user running it, and ensure it is set to 644 so it can be read by other users.

Describe alternatives you've considered

Additional context

This is where the logic is defined in the code:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement User value
Projects
None yet
Development

No branches or pull requests

2 participants