![]() $ chmod 600 config/database.yml config/secrets.yml 3.4 Compile Rails assets and run database migrations ![]() To prevent other users on the system from reading sensitive information belonging to your app, let's tighten the security on the configuration directory and the database directory: $ chmod 700 config db production : secret_key_base : the value that you copied from 'rake secret' If the file didn't already exist, simply insert the following. $ sudo sh -c "chmod 600 ~ myappuser/.ssh/*" 2.3 Install Git on the server ![]() $ sudo sh -c "cat $HOME/.ssh/authorized_keys > ~ myappuser/.ssh/authorized_keys" $ sudo chown -R myappuser: ~ myappuser/.ssh We also ensure that that user has your SSH key installed: $ sudo mkdir -p ~ myappuser/.ssh But for demonstration purposes, this tutorial names the user account myappuser. You should give the user account the same name as your app. ![]() ![]() Passenger will automatically run your app under this user account as part of its user account sandboxing feature. For security reasons, it is a good idea to run each app under its own user account, in order to limit the damage that security vulnerabilities in the app can do. Now that you have logged in, you should create an operating system user account for your app. Starting from this point, unless stated otherwise, all commands that we instruct you to run should be run on the server, not on your local computer! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |