Ghost installation - permissions issues

Hello,
I’m getting the following after trying to restore a ghost backup from a .zip file i made:

✔ Checking system Node.js version - found v12.22.12
✔ 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
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_lazymarcel-com
✔ Validating config
✖ Checking folder permissions
✖ Checking file permissions
✔ Checking memory availability
✖ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v12.22.12
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 binary dependencies

Message: The installed node version has changed since Ghost was installed.
Help: Run ghost update 3.3.0 --force to re-install binary dependencies.

Debug Information:
    OS: Ubuntu, v20.04.4 LTS
    Node Version: v12.22.12
    Ghost Version: 3.3.0
    Ghost-CLI Version: 1.22.0
    Environment: production
    Command: 'ghost doctor'

I have set all the permissions as in the install guide and I just cannot get this to work, can someone please point me in the right direction? I’ve been using the same install of ghost from 2014 till now and my knowledge is quite limited.

Have you run sudo find ./ -type d -exec chmod 00775 {} \; as indicated?

1 Like

oh wow that did it! i was pasting those commands in but they were not returning anything, i waited a little longer and now they went through. thank you so much!

The second leading zero to chmod looked like a mistake to me, but today I learned it serves a purpose. Here’s from the chmod docs:

For directories chmod preserves set-user-ID and set-group-ID bits unless you explicitly specify otherwise. You can set or clear the bits with symbolic modes like u+s and g-s. To clear these bits for directories with a numeric mode requires an additional
leading zero like 00755, leading minus like -6000, or leading equals like =755.

1 Like