>and then invoked the CGI program directly. There was no security sandbox, and CGI was definitely not safe for multi-tenancy This isn't true. Linux is the security sandbox. Multitenacy is safe using a user for each site. >Like CGI, PHP was never multi-tenant safe. This is isn't a problem with PHP. The following story about the author's site on a shared host getting hacked was a problem of shared hosts not caring abou…
I'd argue it is, since PHP's common runtimes expect you to cross user boundaries all the time:
- as Apache2 module, PHP runs as the same user as the web server, so the web server needs to have write access across all tenants.
- FPM recommends running as a TCP socket, letting tenants freely access other tenants' PHP processes. Unix sockets can solve that issue with carefully permissions, but the documentation barely mentions that use case.
Containers are the minimum security boundary.