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

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

Open
@drnguyenn

Description

@drnguyenn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions