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

Ghost log file permissions #303

Closed
kirrg001 opened this issue Jul 6, 2017 · 4 comments · Fixed by #320
Closed

Ghost log file permissions #303

kirrg001 opened this issue Jul 6, 2017 · 4 comments · Fixed by #320
Labels

Comments

@kirrg001
Copy link
Contributor

kirrg001 commented Jul 6, 2017

> kate@dev-kate-01:~/ghost-kate$ ghost ls
┌────────────────┬──────────────┬──────────────┬──────────────────────┬──────────────────────────────────────┬──────┬─────────────────┐
│ Name           │ Location     │ Version      │ Status               │ Url                                  │ Port │ Process Manager │
├────────────────┼──────────────┼──────────────┼──────────────────────┼──────────────────────────────────────┼──────┼─────────────────┤
│ 207-154-219-31 │ ~/ghost-kate │ 1.0.0-beta.2 │ running (production) │ https://kate-ghost-test.acburdine.me │ 2368 │ systemd
> kate@dev-kate-01:~/ghost-kate$ ghost log
An error occurred.
Message: 'file does not exist'
> kate@dev-kate-01:~/ghost-kate$ ghost run
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: EACCES: permission denied, open '/home/kate/ghost-kate/content/logs/https___kate_ghost_test_acburdine_me_production.error.log'
    at Error (native)

I had no problem with Ghost log files when i installed/started Ghost with my root user.
kate is part of the sudoers group. The whole installation (nginx, ssl, mysql, systemd) worked well.

total 8
drwxrwxr-x 2 ghost ghost 4096 Jul  6 19:13 ./
drwxrwxr-x 7 ghost ghost 4096 Jul  6 19:13 ../
@kirrg001 kirrg001 added the bug label Jul 6, 2017
@acburdine
Copy link
Member

The actual permissions error is because you tried to run ghost run, which won't work after the permissions have been changed by the ghost user.

However, the first issue of ghost log erroring when a log file doesn't exist, is a different one. I can fix that 😄

@kirrg001
Copy link
Contributor Author

kirrg001 commented Jul 9, 2017

I am still hitting this permission error.
Even with your fix for ghost log.

> ghost start (or ghost run)

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: EACCES: permission denied, open '/var/www/ghost/content/logs/https___kate_ghost_2_acburdine_me_production.error.log'
    at Error (native)

Permissions:
drwxrwxr-x 2 ghost ghost

Using sudo ghost run or sudo ghost start resolves this.
But i thought that is not needed? 😕

@kirrg001 kirrg001 reopened this Jul 9, 2017
@kirrg001
Copy link
Contributor Author

Can't reproduce anymore. Will add to the troubleshoot section.

@acburdine
Copy link
Member

this should actually be fixed by #327

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

Successfully merging a pull request may close this issue.

2 participants