4 ms·
Something that a lot of Ruby deployment setups seem to be missing is setting up proper user permissions for apps and deployment. The first step is to have sepa
by donw 12y ago
Something that a lot of Ruby deployment setups seem to be missing is setting up proper user permissions for apps and deployment.
The first step is to have separate user accounts for everybody that's going to be deploying apps. You really don't want shared accounts (like a single 'deployer' user), because you get no audit trail on who-does-what, and you effectively lose access control to your machines.
The second step is to run the app itself as a limited-privilege user -- no write permissions to anything except for logs and tempfiles. A lot of attacks depend on your app being able to overwrite parts of its own code; if that can't happen, the attack fails.