Unable to update ghost. Please help

ghost-cli

#1

I have installed ghost on Digital Ocean a few weeks back & I am having no problems with the installation.

When trying to update I get this error message:

An error occurred.
Message: 'EACCES: permission denied, open ‘/var/www/ghost/.ghost-cli’'

Now I am unable to update ghost. Please help.

ghost doctor command

:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Ensuring user is not logged in as ghost user
:heavy_check_mark: Checking if logged in user is directory owner
:heavy_check_mark: Checking current folder permissions
:heavy_check_mark: Checking operating system compatibility
:heavy_check_mark: Checking for a MySQL installation
Running sudo command: systemctl is-active ghost_139-59-31-191
:information_source: Validating config [skipped]
:heavy_check_mark: Checking folder permissions
:heavy_check_mark: Checking file permissions
:heavy_check_mark: Checking content folder ownership
:heavy_check_mark: Checking memory availability


#2

maybe try sudo ghost doctor?


#3

Seems like a permission error. In the doc they refer to:

find ./ -type d -exec chmod 775 {} \;
find ./ ! -path "./versions/*" -type f -exec chmod 664 {} \;

#4

I also had a issue updating Ghost a few weeks back. I also had something that had to do with permissions for user, and it didn’t work even when I switched to my deployment user nor running permission commands so I ended up backing up my blog’s content folder and slowly updating the version using the CLI (I had Docker so it made things a bit safer for my situation).

Here’s one guess
Maybe try stopping your ghost instance (don’t delete it).
Then try to update it again using the CLI.
Once it’s finished updating, start the ghost instance once more, and see if that works.

Sometimes that works for me for other website project commands. :slight_smile: