Default pristine install breaks reproducible on the following error:
Debug Information:
OS: Ubuntu, v16.04
Node Version: v8.9.0
Ghost-CLI Version: 1.6.0
Environment: production
Command: 'ghost install'
Message: The database migration in Ghost encountered an error.
Help: https://docs.ghost.org/v1/docs/troubleshooting#section-general-update-error
--------------- stderr ---------------
Sorry, user vagrant is not allowed to execute '/home/vagrant/projects/ghost/current/node_modules/.bin/knex-migrator-migrate --init --mgpath /home/vagrant/projects/ghost/current' as ghost on cakebox.
Probably not related but user vagrant logs in using certificate based authentication
Running the following command manually produces the same error:
However, it sounds like you might be trying to set this up using some external tools for management, and might not want to grant the vagrant user verbatim sudo access.
Our production install guide is extremely detailed: https://docs.ghost.org/docs/install. There’s a lot of content, but the reason for that is ensuring that we cover all of these cases.
You can also try running ghost doctor as that should be able to highlight problems, although it’s still a work in progress.
The install might work fine in any directory, but there’s also updates to consider. The directory is of consequence, using the correct location ensures that all ghost commands continue to work for the lifetime of the site