Unable to install Ghost


#1

I’ve been working on my first Ghost theme for the last few weeks. Just tried to install it on our server and I’ve gone through all the steps (creating user, setting permissions). Installed the CLI okay, but when I try install Ghost itself I’m getting a permission error:

OS & Ghost version:

OS: Ubuntu, v16.04
Node Version: v6.14.3
Ghost-CLI Version: 1.8.1
Environment: production

Command: ‘ghost install’

Error:

ghost install
:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Checking current folder permissions
:heavy_check_mark: Checking operating system compatibility
:heavy_check_mark: Checking for a MySQL installation
:heavy_check_mark: Checking memory availability
:heavy_multiplication_x: Checking for latest Ghost version
A ProcessError occurred.

Message: Command failed: yarn info ghost versions --json
{“type”:“error”,“data”:“An unexpected error occurred: “EACCES: permission denied, scandir ‘/home/server/.config/yarn/link’”.”}

{“type”:“info”,“data”:“If you think this is a bug, please open a bug report with the information provided in “/var/www/ghost/yarn-error.log”.”}
{“type”:“info”,“data”:“Visit https://yarnpkg.com/en/docs/cli/info for documentation about this command.”}

Exit code: 1

Anyone know a solution?


#2

Looks like your permissions are not correct, maybe it’s that, try:

sudo chmod 775 /var/www/ghost

If you want to look at it, I wrote a guide on how to install it step by step:

or maybe it’s something in your json, which I have no idea.


#3

I definitely set permission 775, and made the user own the directory. I was following the docs guide, but it has similar steps.


#4

The doc is excellent, I installed it from there. But you are not following straight, you are using yarn and the docs use npm. Where are you following the guide from then? I remember I had a lot of trouble when installing it from other sources that was not the official doc.

If you go with the NPM, make sure to not have any conflicts with yarn


#5

Try re-setting permission for /home/server/.config

P.S. Sorry for not using code block I can’t add it due to mobile keyboard


#6

I was using npm, I assumed the yarn error was something ghost was using internally? I’m pretty sure I’ve not got yarn installed on the server! I’ll check and try remove it.


#7

I’m not sure will it help but did you try to install yarn manually before installing ghost.


#8

I did not. I’ll try installing yarn manually.

When you said to try re-setting permissions for /home/server/.config (btw ‘server’ was the user I created) should I reset it to the default 755, or 775?

Thanks!


#9

I checked, it seems like it is 700.


#10

I recommend creating a new VPS and start experimenting, it’s a very straightforward installation


#11

Problem is I’m trying to install it on an existing VPS running node! I think something to do with the existing set up caused the problem (although I had the right version of node, and no NVM etc)

I checked the permissions on the directory:

drwx------ 6 server server 4096 Aug 14 18:41 .
drwxr-xr-x 5 root root 4096 Aug 13 20:04 …
-rw------- 1 server server 856 Aug 13 21:01 .bash_history
-rw-r–r-- 1 server server 220 Aug 13 20:04 .bash_logout
-rw-r–r-- 1 server server 3771 Aug 13 20:04 .bashrc
-rw-r–r-- 1 server server 0 Aug 13 20:04 .cloud-locale-test.skip
drwx------ 3 root root 4096 Aug 13 20:08 .config
drwxrwxr-x 3 server server 4096 Aug 13 20:35 .ghost
-rw------- 1 server server 0 Aug 14 18:41 .node_repl_history
drwxr-xr-x 4 server server 4096 Aug 13 20:11 .npm
drwxrwxr-x 4 server server 4096 Aug 13 20:20 .pm2
-rw-r–r-- 1 server server 655 Aug 13 20:04 .profile
-rw-r–r-- 1 server server 0 Aug 13 20:07 .sudo_as_admin_successful

for some reason the .config was created by the root user. Setting it ownership to the server user with:

sudo chown server:server /home/server/.config

seems to have resolved the issue!


#12

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.