Trying to upgrade from 1.8.6

It’s been a while since I maintained this site, but I noticed it’s throwing an error about the current casper theme being unavailable, so I figured I’d try to run ghost update and see if that fixes it. However, I’m getting this error:

An error occurred.
Message: 'Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#' -E -u ghost mkdir     /var/www/musingmommy.com/content/settings
mkdir: cannot create directory ‘/var/www/musingmommy.com/content/settings’: File exists

'


Debug Information:
OS: Ubuntu, v18.04
Node Version: v8.10.0
Ghost-CLI Version: 1.8.1
Environment: production
Command: 'ghost update'

So the Ghost-CLI has added a migration to add a new folder in the content folder. This code doesn’t protect against the folder being created already. Have you manually created content/settings? If not, can you remember the steps you did?

I would suggest to remove the content/settings folder if you haven’t used this folder yet.

Thanks for the quick reply @Kate.

I honestly can’t remember when I set this up, or what the steps were to do so back then. If I remove content/settings, would that bork up the site?

Should not, because Ghost will re-create the folder and files which are in there.

But to double check: Is the folder empty?

1 Like

Yep it’s empty, I’ll give it a go, thank you very much!

Ok I think this may be a permissions issue, I thought I set my current user’s permissions correctly, but now I get this:

mkdir: cannot create directory ‘/var/www/musingmommy.com/content/settings’: Permission denied

Which CLI version are you on?

1.8.1

And what is the output of ghost doctor?

:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Ensuring user is not logged in as ghost user
:heavy_check_mark: Checking if logged in user is directory owner
:heavy_check_mark: Checking current folder permissions
System checks failed with message: ‘Linux version is not Ubuntu 16’
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using ghost install local instead.
? Continue anyway? Yes
:information_source: Checking operating system compatibility [skipped]
:heavy_check_mark: Checking for a MySQL installation
Running sudo command: systemctl is-active ghost_musingmommy-com
:information_source: Validating config [skipped]
:heavy_check_mark: Checking folder permissions
:heavy_check_mark: Checking file permissions
:heavy_check_mark: Checking content folder ownership
:heavy_check_mark: Checking memory availability

I made sure the user is part of sudoers but I don’t know what else to check.

We currently only support Ubuntu 16, see.

Hm could you share the whole error stack?
Which version is your blog on? ghost ls.

That returns the version of a another blog I’m running on that machine, but not the version of the blog whose directory I’m in. Sounds like I have a weird setup and should expect troubles, I will troubleshoot more later, thanks for helping!

Ok I stumbled across something that worked. I ran

ghost setup linux-user

And it’s letting me upgrade now o.O

Hmm then i guess the ghost user wasn’t setup correctly when you have installed Ghost.

1 Like

Two things which should be investigated:

  1. Why did ghost doctor not complain?
  2. We should protect creating the settings folder if it already exist.
1 Like

I have raised an issue Protect against existing settings folder · Issue #776 · TryGhost/Ghost-CLI · GitHub and left a comment on Ghost Doctor improvements · Issue #47 · TryGhost/Ghost-CLI · GitHub.

1 Like

Thanks for the help Kate.

If it helps at all, I had tried installing a custom theme (to get around the theme issue I was having) and when I tried running

ghost restart

It complained with this:

Message: Systemd process manager has not been set up or is corrupted.
Help: Run ghost setup linux-user systemd and try again.

And after that I had the idea to retry updating.

1 Like

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