Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local setup complains about directory permissions #711

Closed
4 of 6 tasks
mlewe opened this issue Apr 29, 2018 · 16 comments · Fixed by #712
Closed
4 of 6 tasks

local setup complains about directory permissions #711

mlewe opened this issue Apr 29, 2018 · 16 comments · Fixed by #712

Comments

@mlewe
Copy link

mlewe commented Apr 29, 2018

This issue is a

  • Bug Report
  • Feature Request

Summary

Using ghost-cli for a local setup (ghost install local) fails to start ghost again because of directory permissions.

Steps to Reproduce

  1. ghost install local works, starts ghost
  2. ghost stop works
  3. ghost start fails with the permission error given below
  4. ghost start --no-setup-linux-user ignores directory permissions, starts ghost as expected
$ ghost start
Found a development config but not a production config, running in development mode instead
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✖ Checking current folder permissions
✔ Validating config
✔ Checking memory availability
One or more errors occurred.

1) SystemError

Message: The path /home/foobar/ is not readable by other users on the system.
This can cause issues with the CLI, please either make this directory readable by others or run `ghost install` in another location.

Debug Information:
    OS: Arch, vrolling
    Node Version: v6.14.1
    Ghost-CLI Version: 1.7.1
    Environment: development
    Command: 'ghost start'

Try running ghost doctor to check your system for known issues.

Please refer to https://docs.ghost.org/v1/docs/troubleshooting#section-cli-errors for troubleshooting.

Technical details (for a bug report)

This is automatically output by Ghost-CLI if an error occurs, please copy & paste:

  • OS: Arch, vrolling
  • Node Version: v6.14.1
  • Ghost-CLI Version: 1.7.1
  • Environment: development
  • Command: 'ghost start'

Bug submission checklist

Please fill out this checklist to acknowledge that you followed the requirements to submit a bug report.

  • Tried to find help in the forum & docs
  • Checked for existing issues
  • Attached log file … no log file exists
  • Provided technical details incl. operating system
@aileen
Copy link
Member

aileen commented Apr 30, 2018

Hey @mlewe 👋

Thanks for the bug report! I can confirm that on install, we pass this task, because the local argument is given. But for the commands start and update it's missing and we actually run this check. This is not correct, as we should pass it for local installs as well. I'll add a fix for this and it should be solved in the next release. In the meantime, you will have to use ne --no-setup-linux-user flag for ghost update and ghost start as a workaround.

@aileen
Copy link
Member

aileen commented May 10, 2018

Hey @mlewe

Can you update your CLI? This should be fixed now!

@mlewe
Copy link
Author

mlewe commented May 11, 2018

Yes, it's indeed fixed. :)

@glalonde
Copy link

I'm seeing this same issue, also on arch. Same process of ghost install local, ghost stop, and then ghost start fails like this.

[glalonde@trochanter ghost_local]$ ghost start
Found a development config but not a production config, running in development mode instead
✖ Checking system Node.js version - found v14.17.0
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
✔ Validating config
✔ Checking memory availability
✔ Checking binary dependencies
One or more errors occurred.

1) SystemError

Message: The directory /home/glalonde/ 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: Arch, vrolling
    Node Version: v14.17.0
    Ghost Version: 4.4.0
    Ghost-CLI Version: 1.17.1
    Environment: development
    Command: 'ghost start'

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.

ghost start --no-setup-linux-user does still work, however.

@acburdine
Copy link
Member

@glalonde yeah - this is definitely still a known issue 😕 we'll make sure to address it as part of some larger refactoring we're planning on in the CLI

@marian-oprisan
Copy link

marian-oprisan commented Nov 24, 2022

I hope this helps some of you.
My issue was ubuntu version. I was using 22.10 and kept getting into issues. As soon as I switched to ubuntu 20.04, everything worked as it should. I know that ubuntu 22.10 is not listed as supported, but my server was already set up with that version.

@dvlprlat
Copy link

Any known fix for Manjaro?

@tomwarner13
Copy link

I just encountered this exact same issue with what appears to be the latest version of Ghost-CLI running on Ubuntu. The workaround of using ghost start --no-setup-linux-user works fine, but obviously I'd rather not have to use a workaround. I'm not doing anything goofy or weird with users or permissions or anything -- just did a by-the-book install in a directory on my user account, as my user account.

Debug information in case it helps:


✖ Checking system Node.js version - found v18.13.0
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
✔ Validating config
✔ Checking memory availability
✔ Checking binary dependencies
One or more errors occurred.

1) SystemError

Message: The directory /home/tom/ 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, v20.04.5 LTS
    Node Version: v18.13.0
    Ghost Version: 5.29.0
    Ghost-CLI Version: 1.24.0
    Environment: development
    Command: 'ghost start'```

@marian-oprisan
Copy link

"Ghost-CLI will create a new system user and user-group called ghost during the installation process. The ghost user will be used to run your Ghost process in systemd . This means that Ghost will run with a user that has no system-wide permissions or a shell that can be used (similar to other services such as NGINX)."
Souce: https://ghost.org/docs/ghost-cli/#:~:text=Ghost%2DCLI%20will%20create%20a,other%20services%20such%20as%20NGINX).

I think you should check that the user and group were successfully created.

@tomwarner13
Copy link

I'm not seeing that user on my system, so it does indeed sound like that is the issue -- I don't have the output of the install command anymore but if I remember correctly it looked like it finished fine and nothing had gone wrong, so it's possible it could use a warning (it's also possible there was a great big warning and I ignored it though)

@isaacgr
Copy link

isaacgr commented Feb 25, 2023

Still seeing this when running ghost install


Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org



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

1) SystemError

Message: The directory /home/isaac/ 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.1 LTS
    Node Version: v16.19.0
    Ghost-CLI Version: 1.24.0
    Environment: production
    Command: 'ghost install'

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.

@asimuzzaman
Copy link

It was supposed to get resolvd earlier but the "bug" still persists. When running ghost start after clean installation using ghost install local it shows:

Running in development mode

✖ Checking system Node.js version - found v16.13.0
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
✔ Validating config
✔ Checking memory availability
✔ Checking binary dependencies
One or more errors occurred.

1) SystemError

Message: The directory /home/username/ 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.2 LTS
    Node Version: v16.13.0
    Ghost Version: 5.42.1
    Ghost-CLI Version: 1.24.0
    Environment: development
    Command: 'ghost start'

Try running ghost doctor to check your system for known issues.

Steps to reproduce:

  • Run ghost install local
  • Run ghost stop
  • Run ghost start

@circus2271
Copy link

This issue is a

  • Bug Report
  • Feature Request

Summary

Using ghost-cli for a local setup (ghost install local) fails to start ghost again because of directory permissions.

Steps to Reproduce

  1. ghost install local works, starts ghost
  2. ghost stop works
  3. ghost start fails with the permission error given below
  4. ghost start --no-setup-linux-user ignores directory permissions, starts ghost as expected
$ ghost start
Found a development config but not a production config, running in development mode instead
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✖ Checking current folder permissions
✔ Validating config
✔ Checking memory availability
One or more errors occurred.

1) SystemError

Message: The path /home/foobar/ is not readable by other users on the system.
This can cause issues with the CLI, please either make this directory readable by others or run `ghost install` in another location.

so if the path /home/foobar/ is not readable by other users on the system, so maybe making it readable will solve the issue

at least, it worked in my case:

my folder was called ubuntu22user (and its path was /home/ubuntu22user)
so I checked its read permissions by typing ls -la /home | grep ubuntu22user and get this output:
drwxr-x--- 14 ubuntu22user ubuntu22user 4096 Jun 27 18:41 ubuntu22user

so, it means that not everybody has read acces to this folder (this article clarified this to me)

so I just granted everybody read access by typing:
chmod 754 /home/ubuntu22user/ and it fixed the issue

@rohit-ghoghari
Copy link

rohit-ghoghari commented Feb 13, 2024

I fixed by below command.

chmod 754 /home/<user>

@johnhorsema
Copy link

I fixed by below command.

chmod 754 /home/<user>

Thanks, this worked for Ubuntu 23.10 on Ghost 5.82.1

@jon-xo
Copy link

jon-xo commented Aug 16, 2024

I fixed by below command.

chmod 754 /home/<user>

Just a note, I had to add the recursive option to get ghost doctor to pass.
chmod 754 -R /home/<user>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.