"Working directory is not a recognisable Ghost installation"

I’m getting

Working directory is not a recognisable Ghost installation

when trying to run ghost doctor so I presume that some of my permissions are messed up.

Is there a list anywhere for the best practice permissions for:

  • The Ghost root directory
  • All 9 of the sub-directories

For convenience, these are (at least on my install):

  • /apps
  • /data
  • /files
  • /images
  • /logs
  • /media
  • /public
  • /settings
  • /themes

Anyone else facing the following output when trying to use Ghost CLI?

Working directory is not a recognisable Ghost installation

I installed a new Ghost instance yesterday by following a tutorial written by Hetzner for their cloud users. IIRC, the steps didn’t require Ghost CLI so … I’m trying to get it to recognise my instance in retrospect (if this is possible).

I’ve tried what seems to be the obvious solution of updating NPM & node-JS but am still getting the same output when in the base level of the Ghost install and using the terminal as my Ghost user rather than root.

Any other steps that can be taken to try get it to work?

You need to cd into the Ghost directory when using the CLI. For example, /var/www/ghost.

Yes, tried that. In the end it seems that following the Hetzner tutorial gave me some kind of mutant ghost installation! I recreated using the official installation method (pip3 etc) and the CLI works just fine.