`ghost update` fails as some of my files have different permissions


#1

This is a migration of the GitHub issue so let me copy the content of the post.

I found that after I upgraded to the version 1.5 or later, the system is no longer upgradable if I have some files on the directory that have wrong premissions (ghost doctor fails). But these files are irrelevant of the ghost (they are my own scripts) and I still want to upgrade it to the latest version.

The ghost update -f command also failed. Is there any way to upgrade it? Or if not, any chance that it will change in a later version? The ghost-cli is 1.7.3. Thanks


#2

The CLI is designed in such a way that it expects full control of the installation directory, although it generally won’t make any super breaking changes without your permission.

That being said, you’re free to have other files in your installation directory. However, you need to make sure your script permissions match what the CLI tells you. This is because with the release of 1.5, there was a major overhaul of the ghost doctor command, part of which runs during ghost upgrade, including enhanced permissions checks. These doctor updates, including the permissions checks, were introduced to alleviate a lot of repeat questions that were coming because of incorrectly configured setups.

ghost update -f forces the update to be run, no matter the state of the previous update; it doesn’t force the CLI to ignore pre-flight checks :wink: The catch-all issue for Ghost Doctor improvements is #47 which contains a todo to add the skip flag for doctor. It’s earmarked for later, so when it’s going to be done is unknown right now.


#3

I had a similar issue. I ran Ghost Doctor and it gave me specific commands to change access privileges and then update ran perfectly.