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

kickstart: fix write_claim_config when executed as a regular user #18406

Merged
merged 2 commits into from
Aug 25, 2024

Conversation

ilyam8
Copy link
Member

@ilyam8 ilyam8 commented Aug 25, 2024

Summary

Reported on Discord

Fixes

./kickstart.sh: 1278: cannot create /opt/netdata/etc/netdata/claim.conf.tmp: Permission denied
WARNING Failed to write claiming configuration. This usually means you do not have permissions to access the configuration directory.

This line is a problem

run_as_root echo "${config}" > "${claim_config}.tmp" || return 1

When you run a command with sudo, it runs with elevated privileges. However, the shell handles the redirection, which is still running with your regular user's privileges.

Test Plan
Additional Information
For users: How does this change affect me?

@ilyam8 ilyam8 requested a review from a team as a code owner August 25, 2024 18:03
@github-actions github-actions bot added the area/packaging Packaging and operating systems support label Aug 25, 2024
Ferroin
Ferroin previously approved these changes Aug 25, 2024
@ilyam8 ilyam8 merged commit 933a209 into netdata:master Aug 25, 2024
139 checks passed
@ilyam8 ilyam8 deleted the fix-write_claim_config-regular-user branch August 25, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants