Report this

What is the reason for this report?

Unable to Update Ghost As Ghost-Mgr - 'EACCES: permission denied, open '/var/www/ghost/.ghost-cli''

Posted on January 26, 2021

Evening All.

I’m new to Ghost, but have [somehow] managed to get a blog up-and-running - https://www.daysoutinthemidlands.co.uk

However, as part of my first routine Ghost “maintenance checks”, I am trying to update Ghost, using a Windows Command Prompt window.

I have tried to run the $ ghost update command, as the root, ghost-mgr (I set up Ghost using a Digital Ocean applet), and another user I created, as advised to do so during Digital Ocean’s installation guide.

Unfortunately, all three accounts keep resulting in the following error:

'EACCES: permission denied, open '/var/www/ghost/.ghost-cli''

As such, I tried following as per this Ghost help article - https://ghost.org/docs/faq/root-user-fix/

The moment I get to the point where I provide the command…

mv /root/.ghost/config /home/<user>/.ghost/config

[Where I replace user with the third user referenced further above - the one that isn’t root or ghost-mgr]

…I receive the following error:

mv: cannot stat '/root/.ghost/config': Permission denied

As such, as I’m at a complete loss now as to how to provide this third user with write access to the root website directory i.e. /var/www/ghost

Many other articles seem to suggest that the ghost-mgr user should be able to run the Ghost update, but in my case, I still receive the ‘Permission Denied’ error highlighted further above.

Any help would be greatly appreciated. I am a complete beginner when it comes to using command line prompts, so where possible, when looking to reply, please bear this in mind, as I may need a little more support than most.

Thanks, everyone.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi there,

As per this discussion here, what you could do is change the owner of the ghost-cli folder to the Ghost user directly:

chown ghost-mgr:ghost-mgr /var/www/ghost/.ghost-cli
chown ghost-mgr:ghost-mgr /var/www/ghost/config.production.json

Let me know how it goes.

Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.