Does adding a non-root user do anything except hinder your own ability to make mistakes? Given the new updates on file perms in WSL2 (docs on file perms, more docs), doing everything as root on linux might actually be more secure (maybe I'm wrong here though).

Relevant conversation on the WSL github: https://github.com/Microsoft/WSL/issues/53

1 Answer 1



Imagine an attack which allows arbitrary code execution, escape to shell, etc. Would you want this attacker to have root privilege or the privileges of a user which only has access to what is needed to run the service?

For most the answer is limited privileges.

  • Ah I wasn't thinking, thanks. The information available on how perms (on files and execution) transfer over between the windows host and WSL was a bit unclear and I was under the impression that there wouldn't be a difference between, for example, popping a shell from a root vs user account. But I can see how arbitrary code execution within the environment has potential to do damage in much the same way as on a native Linux install
    – belkarx
    Mar 10 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.