Root Permission Fix

I cannot run any ghost commands as the “root user”. I am trying to follow the directions here:

But every time I try to run:

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

I receive this error:
mv: cannot stat ‘/root/.ghost/config’: No such file or directory

Can anyone help me?

Can you explain what you’ve done so far? Have you installed any Ghost instances yet? What hosting are you using (i.e Digital Ocean 1-click, or just a regular VPS)?

I am having this exact issue. I have a 1-click DigitalOcean droplet with Ghost installed. I tried to run

ghost update

but it wouldn’t work because I was logged in as root. Found out I needed a new user to run commands, so I created new user, but it still didn’t work because I needed to make user the owner of the directory where ghost is installed. So I followed the guide linked above, but hit the same issue with

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

giving me the error

mv: cannot stat ‘/root/.ghost/config’: No such file or directory

Please advise.

The error you’re seeing sounds like you’re either running as root, or you ran with sudo, which effectively runs as root. Can you ensure you’re not running as root and try again?

Hi, did you find a solution to this?

I am fairly new at this, but I had similar issues when upgrading my 1-click DigitalOcean install yesterday. So take this info with a grain of salt.

Here are the instructions that I successfully followed:

  1. Back up your site (content and theme).
  2. Launch your terminal app and root login to your site:

ssh root@[yourdomain]

  1. Switch to ghost-mgr user

sudo -i -u ghost-mgr

  1. Navigate to your ghost install directory (you can use “which ghost” command to locate it if you don’t know). Default for DigitalOcean is:

cd /var/www/ghost

  1. Update the Ghost CLI:

sudo npm install -g ghost-cli@latest

  1. Update Ghost

‘ghost update’

I had an issue with one of my theme files having the wrong permissions applied so had to chmod a file and try again. It worked after that.

Good luck!

That’s perfect, thank you