Saving Settings/ Configs Error "Permission error, cannot edit setting. Attempted to access core setting from external request"

After upgrading to " Version 3.23.0", I can’t save any core settings at all with this error message:

  • What’s your URL? This is the easiest way for others to debug your issue
    https://medevel.com/

  • What version of Ghost are you using?
    Version 3.23.0

  • What configuration?

  • What browser?
    FireFox and Chromium

  • What errors or information do you see in the console?

    
      2/ghost/api/v3/admin/settings/:1 Failed to load resource: the server responded with a status of 403 ()
      /ghost/#/staff:1 Autofocus processing was blocked because a document's URL has a fragment '#/staff'.
      /ghost/api/v3/admin/settings/:1 Failed to load resource: the server responded with a status of 403 ()
      vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js:9100 Uncaught (in promise) Error: Request was rejected because user is not permitted to perform this operation.
          at e._createCorrectError (vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js:9100)
          at e.handleResponse (vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js:9098)
          at e.handleResponse (ghost.min-862d14919f4770fc05201dacad598ac9.js:1779)
          at e.n [as handleResponse] (vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js:2368)
          at e.<anonymous> (vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js:9087)
          at l (vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js:621)
          at Object.fireWith [as rejectWith] (vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js:622)
          at A (vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js:905)
          at XMLHttpRequest.<anonymous> (vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js:916)
    
    
    
    
  • What steps could someone else take to reproduce the issue you’re having?
    Updating any core settings, title, description, or AMP settings

Update:
What version did you upgrade from?
from 3.21.1

upgrade:
ghost upgrade


Creating new draft posts works, creating or updating posts works as well.

Hey @hamza_m :wave:

Could you provide some more information to help us reproduce the error?

Specifically -

  • What version did you upgrade from?
  • How did you upgrade?

Thanks!

I have the same error now.

Upgraded from 3.21.1 to 3.23 (due to issues with 3.22)

Same here from 3.14.0 to 3.23

What version did you upgrade from?
from 3.21.1

upgrade:
ghost upgrade

I hope this will be fixed in the next update. Please notify us with the update.

Hi all! :wave:

We just released 3.24.0, which fixes this issue. Please update using Ghost-CLI :slightly_smiling_face:

I got DB connection error and it does not rollback to the previous version at all.

 ghost-mgr@ghost-s-1vcpu-1gb-ams3-01:/var/www/ghost$ ghost update
    + sudo systemctl is-active ghost_medevel-com
    ✔ Checking system Node.js version
    ✔ Ensuring user is not logged in as ghost user
    ✔ Checking if logged in user is directory owner
    ✔ Checking current folder permissions
    ✔ Checking folder permissions
    ✔ Checking file permissions
    ✔ Checking content folder ownership
    ✔ Checking memory availability
    ✔ Checking for available migrations
    ✔ Checking for latest Ghost version
    ✔ Downloading and updating Ghost to v3.24.0
    + sudo systemctl stop ghost_medevel-com
    ✔ Stopping Ghost
    ✔ Linking latest Ghost and recording versions
    + sudo systemctl start ghost_medevel-com
    + sudo systemctl stop ghost_medevel-com
    ✖ Restarting Ghost
    A GhostError occurred.

    Message: connect ECONNREFUSED 127.0.0.1:3306
    Help: Unknown database error
    Suggestion: journalctl -u ghost_medevel-com -n 50

    Debug Information:
    OS: Ubuntu, v18.04.4 LTS
    Node Version: v10.21.0
    Ghost Version: 3.24.0
    Ghost-CLI Version: 1.14.1
    Environment: production
    Command: 'ghost update'

    Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2020-07-10T13_54_53_543Z.log

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

    You can always refer to https://ghost.org/docs/api/ghost-cli/ for troubleshooting.



    ? Unable to upgrade Ghost from v3.23.0 to v3.24.0. Would you like to revert back to v3.23.0? Yes
    + sudo systemctl is-active ghost_medevel-com
    + sudo systemctl reset-failed ghost_medevel-com
    ✔ Checking system Node.js version
    ✔ Ensuring user is not logged in as ghost user
    ✔ Checking if logged in user is directory owner
    ✔ Checking current folder permissions
    ✔ Checking folder permissions
    ✔ Checking file permissions
    ✔ Checking content folder ownership
    ✔ Checking for available migrations
    ✔ Checking for latest Ghost version
    ℹ Downloading and updating Ghost [skipped]
    + sudo /var/www/ghost/current/node_modules/.bin/knex-migrator-rollback --force --v 3.23.0 --mgpath /var/www/ghost/current
    ✖ Rolling back database migrations
    A ProcessError occurred.

    Message: The database migration in Ghost encountered an error.
    Help: https://ghost.org/faq/upgrade-to-ghost-2-0/#what-to-do-when-an-upgrade-fails
    Suggestion: ghost update --rollback

    Debug Information:
    OS: Ubuntu, v18.04.4 LTS
    Node Version: v10.21.0
    Ghost Version: 3.24.0
    Ghost-CLI Version: 1.14.1
    Environment: production
    Command: 'ghost update'

    Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2020-07-10T13_55_09_991Z.log

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

    You can always refer to https://ghost.org/docs/api/ghost-cli/ for troubleshooting.

I have rebooted the server and restarted the MySQL and it works again.

The main error is resolved.

Thank you.

2 Likes

I’ve tried to update the injection code and get the same error here!
Ghost version:

Ghost-CLI version: 1.14.1
Ghost version: 3.29.1 (at /var/www/ghost)

Error:

ERROR "PUT /ghost/api/v3/admin/settings/" 403
NAME: NoPermissionError
MESSAGE: Attempted to access core setting from external request

level: normal

NoPermissionError: Attempted to access core setting from external request