Do i need to run my Ghost installation as root?

August 26, 2014 1k 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.

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?

Have another answer? Share your knowledge.