2020-12-08 21:12

Ghost CLI 1.5.2 seems to break permissions on node_modules

Welcome to Ghost-CLI's GitHub repo! 👋🎉

Do you need help or have a question? Please come chat in Slack: https://slack.ghost.org/ 👫.

Docs: https://docs.ghost.org 📖.

Please be aware that the team behind the Ghost CLI only supports the recommended stack: https://github.com/TryGhost/Ghost-cli#recommended-stack.

This issue is a

  • [*] Bug Report
  • [ ] Feature Request

Please fill out this template, deleting where appropriate:


Bugs reports: search GitHub for existing issues & check the docs: https://docs.ghost.org/docs/troubleshooting. If you're still stuck, please provide a quick summary of the problem, steps to reproduce, and full tech details including logs.

Feature requests: describe the feature and make a clear, detailed case for adding it.

Steps to Reproduce (for a bug report)

  1. Create a production Ghost installation with the instructions at https://docs.ghost.org/docs/install
  2. Run npm install in the project directory (using the non-'ghost' user) to install a Ghost-approved extension, e.g. https://github.com/colinmeinke/ghost-storage-adapter-s3
  3. See the error message below.

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

I consider this to be a bug because there is no way I can reset the permissions with which to start Ghost.

Log file (for a bug report)

All errors end with "Additional log info available in: [filepath]".

Use the command cat [filepath] to read the log, then copy & paste the contents here:

✔ Checking system Node.js version
✔ Checking current folder permissions
✔ Checking operating system compatibility
✔ Validating config
✔ Checking folder permissions
✖ Checking file permissions
✔ Checking content folder ownership
One or more errors occurred.

1) Checking file permissions

Message: Your installation folder contains some directories or files with incorrect permissions:
- ./node_modules/jmespath/jp.js
- ./node_modules/jmespath/g.sh
- ./node_modules/uuid/bin/uuid
- ./node_modules/buffer/bin/update-authors.sh
- ./node_modules/buffer/bin/download-node-tests.js
- ./node_modules/aws-sdk/dist-tools/browser-builder.js
- ./node_modules/aws-sdk/scripts/changelog/add-change.js
- ./node_modules/aws-sdk/scripts/changelog/release
- ./node_modules/aws-sdk/scripts/changelog/util.js
- ./node_modules/aws-sdk/scripts/changelog/create-changelog
- ./node_modules/aws-sdk/scripts/console
- ./node_modules/aws-sdk/scripts/translate-api
Run sudo find ./ ! -path "./versions/*" -type f -exec chmod 664 {} \; and try again.

Debug Information:
    OS: Ubuntu, v16.04
    Node Version: v6.12.3
    Ghost-CLI Version: 1.5.2
    Environment: production
    Command: 'ghost doctor'

Try running ghost doctor to check your system for known issues.

Please refer to https://docs.ghost.org/v1/docs/troubleshooting#section-cli-errors for troubleshooting.

Technical details (for a bug report)

This is automatically output by Ghost-CLI if an error occurs, please copy & paste:

OS: Ubuntu, v16.04
Node Version: v6.12.3
Ghost-CLI Version: 1.5.2
Environment: production
Command: 'ghost doctor'

Bug submission checklist

Please fill out this checklist to acknowledge that you followed the requirements to submit a bug report.

  • [ *] Tried to find help in Slack & Docs
  • [ *] Checked for existing issues
  • [ *] Attached log file
  • [ *] Provided technical details incl. operating system


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • weixin_39708737 weixin_39708737 4月前

    Are you installing the adapter globally? You shouldn't have a node_modules folder in your installation root 🤔 (node modules will be in root/versions/{version}/)

    点赞 评论 复制链接分享
  • weixin_39708737 weixin_39708737 4月前

    You should actually install them in {root}/content/adapters/storage/{name} (not globally as I said earlier)

    If you followed the directions provided by the adapter repo, you should be fine deleting the {root}/node_modules folder since you should have copied them to the correct location.

    点赞 评论 复制链接分享
  • weixin_39665787 weixin_39665787 4月前

    is correct - following the instructions in the repo for the adapter you're using should fix the issue.

    At some point we'll have a more fluid process for installing adapters (see #49), unfortunately it's not incredibly straightforward at the moment. Going to close this issue in favor of #49 - however if the issue persists after deleting the {root}/node_modules folder then let us know and this issue can be reopened 😄

    点赞 评论 复制链接分享