Issue Summary
ghost backup
command run from ghost-cli fails.
- Explain roughly what’s wrong
- When I run the
ghost backup
command from the ghost-cli, Backing up site fails with messageA ProcessError occurred.
- What did you expect to happen?
- I expected a successful backup to be generated.
Steps to Reproduce
- Log in to server
- Switch user to ghost-mgr.
sudo -i -u ghost-mgr
- Change directory to ghost.
cd /var/www/ghost
- Run
ghost backup
command.
Setup information
Ghost Version
Ghost Version: 5.95.0
Ghost-CLI Version: 1.26.1
Node.js Version
v18.20.4
How did you install Ghost?
Digital Ocean marketplace - Ghost
Provide details of your host & operating system
Ubuntu, v22.04.5 LTS
Database type
mysql 8.0.39-0ubuntu0.22.04.1
Browser & OS version
Include if reporting frontend bugs.
Relevant log / error output
ghost-mgr@ourtwocentstravel:/var/www/ghost$ ghost backup
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
+ sudo systemctl is-active ghost_ourtwocentstravel-com
+ sudo mkdir -p /var/www/ghost/backup
? Enter your Ghost administrator email address ted.leroy@protonmail.com
? Enter your Ghost administrator password [hidden]
+ sudo cp /var/www/ghost/backup/content-from-v5.95.0-on-2024-10-04-14-20-57.json /var/www/ghost/content/data/content-from-v5.95.0-on-2024-10-04-14-20-57.json
+ sudo cp /var/www/ghost/backup/members-from-v5.95.0-on-2024-10-04-14-20-57.csv /var/www/ghost/content/data/members-from-v5.95.0-on-2024-10-04-14-20-57.csv
+ sudo chown -R ghost:ghost /var/www/ghost/content
✖ Backing up site
A ProcessError occurred.
Message: EACCES: permission denied, open '/var/www/ghost/content/data/content-from-v5.95.0-on-2024-10-04-14-20-57.json'
Exit code: EACCES
Shouldn’t the chown command be to ghost-mgr:ghost-mgr, not ghost:ghost?
sudo chown -R ghost:ghost /var/www/ghost/content
should be
sudo chown -R ghost-mgr:ghost-mgr /var/www/ghost/content
shouldn’t it?