DebugFactor.com | Forum

Which user to use for updating ghost with cli `ghost update` command

I have a self-hosted instance of Ghost CMS. While trying to update ghost with ghost-cli, I am getting the following error.

You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
Run npm install -g ghost-cli@latest to upgrade.

  • sudo systemctl is-active ghost_debugfactor-com
    ? Sudo Password [hidden]
    :heavy_check_mark: Checking system Node.js version - found v14.16.1
    :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 folder permissions
    :heavy_multiplication_x: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking free space
    One or more errors occurred.
  1. Checking file permissions

Message: Your installation folder contains some directories or files with incorrect permissions:

  • ./content/themes/ease/assets/js/lib/jquery.fitvids.js
  • ./content/themes/ease/assets/js/lib/lazysizes.min.js
  • ./content/themes/ease/assets/js/lib/jarallax.min.js
  • ./content/themes/ease/assets/js/lib/owl.carousel.min.js
  • ./content/themes/ease/assets/built/main.min.js
  • ./content/themes/ease/assets/fonts/IVEEL.woff
  • ./content/themes/ease/assets/fonts/IVEEL.ttf
  • ./content/themes/ease/assets/fonts/selection.json
  • ./content/themes/ease/assets/fonts/IVEEL.svg
    Run sudo find ./ ! -path “./versions/*” -type f -exec chmod 664 {} ; and try again.

Which user should I be using to update ghost? I tried with ubuntu and ghostuser.

The update command should not be run with ghost user. It is clearly mentioned in the pre-requisite check you pasted.

Ensuring user is not logged in as ghost user

Try running this command and then try to run update again with ghostuser.

Run sudo find ./ ! -path “./versions/*” -type f -exec chmod 664 {} ;

Also make sure that you update the ghost-cli to the latest version before you update your ghost installation.
npm install -g ghost-cli@latest