So… ghost doctor
will return that it can’t check folder permissions. It is failing on the content directory that is owned by the user ghost. I’ve tried all kinds of different permissions for it but finally changed its owner with chown to my non sudo user. Then ghost doctor works and checks permissions in it properly, but it won’t upgrade it because content directory must be owned by ghost.
This feels like a bug? Running Ubuntu 22.04…
Here is the output I have
carlgallagher@srv:~/webapps/app-de-mainsite$ ghost doctor
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
✔ Checking system Node.js version - found v18.16.0
✔ 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
✔ Checking system compatibility
Local MySQL install was not found or is stopped. You can ignore this if you are using a remote MySQL host.
Alternatively you could:
a) install/start MySQL locally
b) run `ghost install --db=sqlite3` to use sqlite
c) run `ghost install local` to get a development install using sqlite3.
? Continue anyway? Yes
MySQL check skipped
ℹ Checking for a MySQL installation [skipped]
+ sudo systemctl is-active ghost_digitallyevolved-net
Instance is currently running
ℹ Validating config [skipped]
✖ Checking folder permissions
✖ Checking file permissions
✖ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v18.16.0
One or more errors occurred.
1) Checking folder permissions
Message: Ghost can't access some files or directories to check for correct permissions.
Help: Run sudo find ./ -type d -exec chmod 00775 {} \; and try again.
2) Checking file permissions
Message: Ghost can't access some files or directories to check for correct permissions.
Help: Run sudo find ./ -type d -exec chmod 00775 {} \; and try again.
3) Checking content folder ownership
Message: Ghost can't access some files or directories to check for correct permissions.
Help: Run sudo find ./ -type d -exec chmod 00775 {} \; and try again.
Debug Information:
OS: Ubuntu, v22.04.2 LTS
Node Version: v18.16.0
Ghost Version: 5.47.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: 'ghost doctor'
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
carlgallagher@srv:~/webapps/app-de-mainsite$ sudo ghost doctor
You can't run commands as the 'root' user.
Switch to your regular user, or create a new user with regular account privileges and use this user to run 'ghost doctor'.
For more information, see https://ghost.org/docs/install/ubuntu/#create-a-new-user.
carlgallagher@srv:~/webapps/app-de-mainsite$ sudo find ./ -type d -exec chmod 00775 {} \;
carlgallagher@srv:~/webapps/app-de-mainsite$ ghost doctor
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
✔ Checking system Node.js version - found v18.16.0
✔ 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
✔ Checking system compatibility
Local MySQL install was not found or is stopped. You can ignore this if you are using a remote MySQL host.
Alternatively you could:
a) install/start MySQL locally
b) run `ghost install --db=sqlite3` to use sqlite
c) run `ghost install local` to get a development install using sqlite3.
? Continue anyway? Yes
MySQL check skipped
ℹ Checking for a MySQL installation [skipped]
+ sudo systemctl is-active ghost_digitallyevolved-net
Instance is currently running
ℹ Validating config [skipped]
✖ Checking folder permissions
✖ Checking file permissions
✖ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v18.16.0
One or more errors occurred.
1) Checking folder permissions
Message: Ghost can't access some files or directories to check for correct permissions.
Help: Run sudo find ./ -type d -exec chmod 00775 {} \; and try again.
2) Checking file permissions
Message: Ghost can't access some files or directories to check for correct permissions.
Help: Run sudo find ./ -type d -exec chmod 00775 {} \; and try again.
3) Checking content folder ownership
Message: Ghost can't access some files or directories to check for correct permissions.
Help: Run sudo find ./ -type d -exec chmod 00775 {} \; and try again.
Debug Information:
OS: Ubuntu, v22.04.2 LTS
Node Version: v18.16.0
Ghost Version: 5.47.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: 'ghost doctor'
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
carlgallagher@srv:~/webapps/app-de-mainsite$