I am trying to upgrade my Ghost instance from 2.22.2 to 2.37.2 but I have permissions problems (I want to go to v3 so I am presuming this is a necessary interim upgrade?)
Checking system Node.js version
Ensuring user is not logged in as ghost user
Checking if logged in user is directory owner
Checking current folder permissions
Checking folder permissions
Checking file permissions
Checking content folder ownership
Checking memory availability
One or more errors occurred.
1) Checking if logged in user is directory owner
Message: Your user does not own the directory /var/www/ghost and is also not a member of the owning group.
You must either log in with the user that owns the directory or add your user to the owning group.
2) Checking current folder permissions
Message: The directory /var/www/ghost is not writable by your user. You must grant write access and try again.
- OS: Ubuntu, v18.04.3 LTS*
- Node Version: v10.18.0*
- Ghost Version: 2.22.2*
- Ghost-CLI Version: 1.13.1*
- Environment: production*
- Command: ‘ghost update’*
If I try to run as myself, I get permissions errors. If I try to run as root, it won’t let me. I su’d to Ghost but I can’t use that account either.
The permissions are set as follows:
-rw-r–r-- 1 ghost-mgr ghost-mgr 606 May 23 2019 config.production.json
drwxr-xr-x 8 ghost ghost 4096 May 23 2019 content
lrwxrwxrwx 1 ghost-mgr ghost-mgr 30 May 23 2019 current -> /var/www/ghost/versions/2.22.2
drwxr-xr-x 4 ghost-mgr ghost-mgr 4096 May 23 2019 system
drwxr-xr-x 3 ghost-mgr ghost-mgr 4096 May 23 2019 versions
I’m reluctant to start changing ownership of folders as I suspect this is the wrong approach
This is a droplet on Digital Ocean using their image. I’m not super savvy with Ghost behind the scenes and I am obviously doing something wrong, but the docs that are linked to don’t really explain permissions.
How can I safely upgrade? I think in the past I did it the old way of downloading source files & copying as opposed to using ghost-cli
Any tips appreciated
PS - If I wanted to build a new Ghost box, what is the easiest way to migrate content? Is it the json export and /content folder from current instance, and copy/import to new host?