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

Trying to instal Ghost inside the `/root` directory should throw an error #352

Closed
edmondyip opened this Issue Jul 12, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@edmondyip
Copy link

edmondyip commented Jul 12, 2017

Debug Information:
    Node Version: v6.9.4
    Ghost-CLI Version: 1.0.0-rc.2
    Environment: production

I can run Ghost with manual install before
But i also want to try ghost cli
I have success install it, and build databse
When I use ghost start to start the ghost
Everything seen fine

✔ Validating config
Running sudo command: systemctl start ghost_localhost
✔ Starting Ghost
You can access your blog at http://localhost:2368/

Ghost uses direct mail by default
To set up an alternative email method read our docs at https://docs.ghost.org/docs/mail-config

But i can't see anything
I use ghost ls to check it

┌───────────┬─────────────┬────────────┬─────────┬─────┬──────┬─────────────────┐
│ Name         │ Location     │ Version    │ Status  │ URL │ Port │ Process Manager │
├───────────┼─────────────┼────────────┼─────────┼─────┼──────┼─────────────────┤
│ localhost    │ ~/ghost    │ 1.0.0-rc.1 │ stopped │ n/a │ n/a  │ n/a             │
└───────────┴─────────────┴────────────┴─────────┴─────┴──────┴─────────────────┘

It keep stopped
I cannot start it but don't know why
Can't get any error msg

@acburdine

This comment has been minimized.

Copy link
Member

acburdine commented Jul 12, 2017

Hey @edmondyip, can you try running ghost run and see what the output of that is? Thanks!

@edmondyip

This comment has been minimized.

Copy link
Author

edmondyip commented Jul 12, 2017

The `ghost run` command is used by the configured Ghost process manager and for debugging. If you're not running this to debug something, you should run `ghost start` instead.
Running sudo command: node current/index.js
module.js:471
    throw err;
    ^

Error: Cannot find module '/root/ghost/current/index.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
@acburdine

This comment has been minimized.

Copy link
Member

acburdine commented Jul 12, 2017

Ah ok - I see what the problem is. You've installed ghost into the /root directory, which is not readable by any of the other users on the system, hence the issue with ghost run.

As per the documentation here: https://docs.ghost.org/docs/installing-ghost-via-the-cli -> it is recommended to install ghost in /var/www/ghost or someplace similar, installing where you've installed it simply won't work.

@acburdine acburdine changed the title Cannot start Ghost with CLI Trying to instal Ghost inside the `/root` directory should throw an error Jul 12, 2017

@acburdine

This comment has been minimized.

Copy link
Member

acburdine commented Jul 12, 2017

Leaving this issue open for documentation and adding a check into the CLI to throw an error if installing ghost inside the /root folder is attempted.

@sebgie

This comment has been minimized.

Copy link
Contributor

sebgie commented Jul 13, 2017

Documentation is updated.

@acburdine a check while installing is definitely a good idea! Does that warrant a separate issue with how it should work?

@acburdine

This comment has been minimized.

Copy link
Member

acburdine commented Jul 13, 2017

Probably. I can raise one later today.

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