Question

Do i need to run my Ghost installation as root?

Posted August 26, 2014 2.5k views

Hi! Do i need to run my Ghost installation as root? Can I change to another user with su privileges? And how would I go about permissions for /var/www/ to make it work and have write access (to upload themes, etc.)?
I tried changing the owner of /var/www/ to another user, then to root and group (root:group), but all I accomplished is SQL errors and the need to reinstall the droplet.

Any help welcome.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

No, you can run Ghost as a different user. The DigitalOcean One-Click app sets up a dedicated ghost user for instance. It also sets the folder containing Ghost to be owned by that user chown -R ghost:ghost /var/www/ghost

Ok then, let me rephrase my question.
I would like to disable ssh access for root, but allow a new user which I will create read/write access to my ghost directory. Giving the access is the problem for me, as I don’t want to mess up permissions needed for ghost service to serve my website and interfere with user “ghost”.
Can you give me any clues on how to best approach this?

Submit an Answer