Created
May 3, 2012 07:50
-
-
Save sandys/2584113 to your computer and use it in GitHub Desktop.
Securing server processes by creating a non-privileged user to run commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add a system user | |
sudo adduser --system --home=/opt/openerp --group openerp | |
#copying config files to correct locations | |
#The below commands make the file owned and writeable only by the openerp user and group and only readable by openerp #and root. | |
sudo cp /opt/openerp/server/install/openerp-server.conf /etc/ | |
sudo chown openerp: /etc/openerp-server.conf | |
sudo chmod 640 /etc/openerp-server.conf | |
#running the command | |
sudo su - openerp -s /bin/bash # to open a shell | |
#or | |
sudo -u openerp /opt/openerp/server/openerp-server --config=/opt/openerp/server/install/openerp-server.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment