Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Permission denied when writing to /etc/sysctl.conf #46

Open
drnguyenn opened this issue May 8, 2021 · 0 comments
Open

Permission denied when writing to /etc/sysctl.conf #46

drnguyenn opened this issue May 8, 2021 · 0 comments

Comments

@drnguyenn
Copy link

Hi. Thanks for a really useful repository.

I saw you wrote this in README.md:
sudo echo 'vm.max_map_count=262144' >> /etc/sysctl.conf (to persist reboots)
However, as far as I research,

You can't use sudo to affect output redirection; > and >> (and, for completeness, <) are effected with the privilege of the calling user, because redirection is done by the calling shell, not the called subprocess.

You can see more details in this question.
So I think the command should be:
sudo sh -c 'echo "vm.max_map_count=262144" >> /etc/sysctl.conf'

Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant