To facilitate source control of a multi-tenanted ghost VPS, I have all my config.production.json in /etc/ghost and have linked config.production.json from each blog back to the relevant file in etc.
Even though all the ownership and permissions of the relevant files - including the link-files themselves - are correct (i.e. non-root and non-ghost), the ghost update
command fails with this error:
✔ Stopping Ghost
✔ Linking latest Ghost and recording versions
✖ Running database migrations
An error occurred.
Message: 'EACCES: permission denied, open '/var/www/normus.totahi.com/config.production.json''
Debug Information:
OS: Debian, v9.4
Node Version: v6.14.1
Ghost-CLI Version: 1.7.1
Environment: production
Command: 'ghost update'
Additional log info available in: /home/normus/.ghost/logs/ghost-cli-debug-2018-04-18T16_28_42_550Z.log
Try running ghost doctor to check your system for known issues.
When I run ghost doctor it thinks everything is ok… which kind of confirms that this is not really a permission problem…
ghost doctor
✔ Checking system Node.js version
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
System checks failed with message: 'Linux version is not Ubuntu 16'
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
? Continue anyway? Yes
ℹ Checking operating system compatibility [skipped]
✔ Checking for a MySQL installation
Running sudo command: systemctl is-active ghost_normus-totahi-com
ℹ Validating config [skipped]
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
I have to ghost start
to get the blog back up - it looks ok, but I worry because the fail happens for the database migration stage.