4 ms·
In a container or not, running a compiler-as-a-service as root is never the right way to run a compiler-as-a-service.
by inimino 7y ago
In a container or not, running a compiler-as-a-service as root is never the right way to run a compiler-as-a-service.
- londons_explore 7y agoWhy not? There's a good chance the user will be needing to install extra packages or libraries, or run custom makefile steps that require extra permissions the system designer couldn't anticipate. Running as root I think is the exact thing to run as. Then throw the whole VM or container away when handling a request for another user.
- jagged-chisel 7y agoWhy would your package manager require root to install packages? Can you not perform user-only installs?
- londons_explore 7y agoSure some can, but if you're making a compiler-as-a-service, you want it to be compatible with as many as possible. I suspect being root maximizes compatibility. Hardcoded "/usr/bin" paths are just the start...
- gmfawcett 7y agoCustom makefile steps that require running the compiler as root? More likely they need to run `chown` or `chmod` or something else as root -- i.e., something that has a far smaller attack surface.
- inimino 7y agoRunning a compiler as root in general is not recommended. It's the principle of least privilege. Running without unnecessary privileges is a good idea for the same reason running in a sandbox is a good idea.