Question

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

Posted January 26, 2021 288 views
Ghost

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.

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.

×
Submit an Answer
1 answer

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