Can't start ghost after update (droplet)

Hi there, running Ghost-CLI version: 1.15.3 and Ghost version: 3.40.1 (at /var/www/ghost). Node version 12.20.0.

I did a Ghost one-click install on a DigitalOcean droplet a while back and it worked fine.

I just ran ghost update recently to get from 3.2.0 to 3.40.1. It seemed to work fine, however when I now run ghost start I get the following:

✖ Starting Ghost: morgz-org
A ProcessError occurred.

Message: EACCES: permission denied, open '/var/www/ghost/config.production.json'
Exit code: EACCES


Debug Information:
    OS: Ubuntu, v18.04.4 LTS
    Node Version: v12.20.0
    Ghost Version: 3.40.1
    Ghost-CLI Version: 1.15.3
    Environment: production
    Command: 'ghost start'

Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2020-12-15T14_15_13_708Z.log

Running ghost doctor finds no issues.

The only slightly confusing thing I see is that my current user is ghost-mgr (automatically created with the droplet back in the day), but the ownership of config.production.json is ghost:
-rw-rw-r-- 1 ghost ghost 798 Jun 24 21:01 config.production.json

Thanks for any help!

Here is the output of ls -l if helpful:

ghost-mgr@ghost-droplet:/var/www/ghost$ ls -la /var/www/ghost
total 696
drwxrwxr-x   9 ghost-mgr ghost-mgr   4096 Dec 15 14:14 .
drwxr-xr-x   4 root      root        4096 Dec 14 15:33 ..
-rw-rw-r--   1 ghost-mgr ghost-mgr    144 Dec 15 14:15 .ghost-cli
drwxr-xr-x   2 ghost-mgr ghost-mgr   4096 Dec 15 13:45 __maybe_delete__
drwxr-xr-x   3 ghost     ghost       4096 Dec 14 15:39 backup
-rw-rw-r--   1 ghost     ghost        798 Jun 24 21:01 config.production.json
drwxr-xr-x   9 ghost     ghost       4096 Dec 14 15:33 content
drwxr-xr-x   6 ghost     ghost       4096 Dec  8 09:45 core
lrwxrwxrwx   1 ghost-mgr ghost-mgr     30 Dec 15 14:14 current -> /var/www/ghost/versions/3.40.1
drwxr-xr-x 766 ghost     ghost      28672 Dec 14 15:43 node_modules
-rw-rw-r--   1 ghost-mgr ghost-mgr 636113 Dec 14 15:43 package-lock.json
drwxr-xr-x   4 ghost     ghost       4096 Jun 16 16:23 system
drwxr-xr-x   4 ghost     ghost       4096 Dec 15 14:14 versions

The only folder that should be owned by ghost is the content folder. All other folders should be owned by you (ghost-mgr)

You can change ownership by running sudo chown -r ghost-mgr:ghost-mgr {folder} for folders and sudo chown ghost-mgr:ghost-mgr {file} for files

Once you do that, everything should be dandy :slight_smile:

2 Likes

Thanks for the quick reply! Unfortunately I now get the following:

ghost-mgr@ghost-droplet:/var/www/ghost$ ghost start
+ sudo systemctl is-active ghost_morgz-org
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
+ sudo systemctl is-active ghost_morgz-org
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
+ sudo systemctl start ghost_morgz-org
+ sudo systemctl stop ghost_morgz-org
✖ Starting Ghost: morgz-org
A GhostError occurred.

Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_morgz-org -n 50

Debug Information:
    OS: Ubuntu, v18.04.4 LTS
    Node Version: v12.20.0
    Ghost Version: 3.40.1
    Ghost-CLI Version: 1.15.3
    Environment: production
    Command: 'ghost start'

ghost doctor does not reveal anything different. Running journalctl -u ghost_morgz-org -n 50 just shows the following:

Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
-- Logs begin at Wed 2020-06-24 21:38:40 UTC, end at Tue 2020-12-15 14:14:06 UTC. --
-- No entries --

Other ideas?

Can you run the journal command w/ sudo?

I figured it out! I had emptied out my content folder as a backup and forgotten to paste back in :grimacing:

I had some random errors after that but ran ghost update again to get me to 3.40.2 and that took care of everything.

Thanks Vikas!

1 Like