Ghost Install the directory is not readable by other users

Fill out the following bug report template with as much detail as possible!

Are you sure this is a bug? If you just need help, post in the developer help category. If it’s a feature request, head to the ideas category.


Issue Summary

  • Explain roughly what’s wrong
  • What did you expect to happen?

In the directory /var/www/ghost ran the command ghost install. the permits of the directory are 755.
Error: The directory ```/home/$USER/``` is not readable by other users on the system.
I’m not trying to install it over that directory, actually not at all the PATH I am… Why is it complaining about it?

Steps to Reproduce

  1. This is the first step…
    sudo mkdir /var/www/ghost
  2. This is the second step,
    cd /var/www/
    sudo chown $USER:$USER ghost
    sudo chmod 755 ghost
    cd ghost
    ghost install

Setup information

Ghost Version
Share which version of Ghost you’re using.
Ghost-CLI version: 1.25.3

Node.js Version
If self-hosting - share which version of Node.js you’re using.
v18.17.1

How did you install Ghost?
Provide some details about your install of Ghost if you are self-hosting.
sudo npm install ghost-cli@latest -g

Provide details of your host & operating system
Include further details about your hosting and OS.
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION=“Ubuntu 22.04.3 LTS”

Database type
MySQL 5.7 / MySQL 8 / SQLite 3 / Other
Ver 8.0.36

Browser & OS version
Include if reporting frontend bugs.

Relevant log / error output
Copy and paste any relevant log output. Use backticks to format this into code.

ghost install

✖ Checking system Node.js version - found v18.17.1
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
One or more errors occurred.

1) SystemError

Message: The directory /home/$USER/ is not readable by other users on the system.
This can cause issues with the CLI, you must either make this directory readable by others or install node and Ghost-CLI in another location.

Debug Information:
    OS: Ubuntu, v22.04.3 LTS
    Node Version: v18.17.1
    Ghost-CLI Version: 1.25.3
    Environment: production
    Command: 'ghost install'

The Ghost user home folder needs to be readable, so you’ll need to rectify this. If you ls -Flai /home/$USER you’ll see hidden folders for Ghost, NPM etc. Thus, “… you must either make this directory readable by others or install node and Ghost-CLI in another location.”


Moved to Installation

needs to change permits to 755

```chown 755 /home/$USER``

You shouldn’t need to make any changes to the home folder; this user should be the Ghost user.

I’d expect to have seen these steps from the prompt.

ghost-user@host:~$ # ssh session opened by ghost-user; current folder is ~

curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash
sudo apt install nodejs --yes
sudo npm install ghost-cli@latest -g
sudo mkdir -p /var/www/ghost
sudo chown ghost-user:ghost-user /var/www/ghost
sudo chmod 775 /var/www/ghost
cd /var/www/ghost
ghost install

But are you talking about the ghost user created by the software or any user for example ghost-user?

The Ghost user is the local Linux user account. When you run ghost install without sudo it runs as the logged-in user. This is the user account that runs all the commands shown above. This is why I added:

ghost-user@host:~$ # ssh session opened by ghost-user; current folder is ~

~ means /home/ghost-user in this instance, and this is where npm and Ghost place config files, logs etc.

1 Like