Upgrade error on Debian install - execute permission?

Upgrade of Ghost failing. Exit error 126 on cpy. I have checked permissions of the user executing the ‘ghost update’ and it has execute. I thought maybe npm permissions issue but this is installed locally and does not need sudo.
/bin/sh: 1: cpy: Permission denied

error Command failed with exit code 126.

yarn install v1.16.0

[1/5] Validating package.json…

[2/5] Resolving packages…

[3/5] Fetching packages…

[4/5] Linking dependencies…

[5/5] Building fresh packages…

$ cpy node_modules/@tryghost/members-theme-bindings/build/members-theme-bindings.js core/server/public/

info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Exit code: 126

Any ideas anyone? I had this before and 8 thought overcame the issue with a removal of npm using ‘sudo uninstall npm -g’ but this does not fix now as there is nothing in the root npm install!

Have you run ghost doctor? It should find any permissions issues and report them :wink:

Yes. All clean from Ghost Doctor. No errors. Great idea!

So it seems the command
“postinstall”: “cpy node_modules/@tryghost/members-theme-bindings/build/members-theme-bindings.js core/server/public/”
}
Fails in the package.json

Any idea why?

Solved.

ran
sudo npm uninstall npm -g
This uninstalled the sudo version of fpm installed with node which needed root permissions.

When the upgrade ran this time it worked and installed fpm locally.