This question has been archived.

Deleting blog post on ghost gives 403 (Access denied)

March 8, 2015 2.5k views
Ghost Nginx Ubuntu

I have a ghost blog hosted in subdirectory like I am using latest ghost version.
Whenever I try to delete a post it throws me an error saying 'Unable to deleteand chrome console is showing below error
DELETE 403 (Access Denied)`

I guess something to do with nginx. Everything is working fine in local machine.

Please refer to

  • I can't reproduce this. Any additional details you could share might help us figure out the issue. Could you post your Nginx configuration? Did you install Ghost from scratch or did you use our One-Click app to start from? Do you have any kind of cache like Varnish in front of Nginx?

  • Possibly sudo chown -R ghost:ghost /var/www/ghost if permissions were mangled there for some reason?

  • @tobyb All the files in /var/www/ghost have owner and group as ghost

    -rw-r--r--  1 ghost ghost 53133 Feb 28 20:06 Gruntfile.js
    -rw-r--r--  1 ghost ghost  1065 Feb 28 20:06 LICENSE
    -rw-r--r--  1 ghost ghost  2933 Feb 28 20:06
    -rw-r--r--  1 ghost ghost  6405 Feb 28 20:06
    -rw-r--r--  1 ghost ghost  1324 Feb 28 20:06 bower.json
    -rw-r--r--  1 ghost ghost  3782 Feb 28 20:06 config.example.js
    -rw-r--r--  1 ghost ghost  4094 Mar  8 10:13 config.js
    drwxr-xr-x  6 ghost ghost  4096 Feb 28 20:06 content
    drwxr-xr-x  6 ghost ghost  4096 Feb 28 20:06 core
    -rw-r--r--  1 ghost ghost   835 Feb 28 20:06 index.js
    drwxr-xr-x 42 ghost ghost  4096 Mar  3 13:14 node_modules
    -rw-r--r--  1 ghost ghost 86430 Feb 28 20:06 npm-shrinkwrap.json
    -rw-r--r--  1 ghost ghost  3234 Feb 28 20:06 package.json
  • @asb I tried both the approaches multiple times. currently i am running one-click app.
    Here is is sites-enabled/ file (I am using mydomain instead of actual domain here.)

    # Redirecting naked domain to www
    server {
        listen 80;
        return 301$request_uri;
    #Redirecting old blogpost to ghost blog
    server {
        listen 80;
        return 301$request_uri;
    server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;
        server_name; # Replace with your domain
        root /usr/share/nginx/html;
        index index.html index.htm;
        client_max_body_size 10G;
       # Redirecting main website on github page to
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $http_host;
       # Config for ghost blog
        location ~* /blog {
            proxy_pass http://localhost:2368;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_buffering off;
  • @dkoder - those permissions look like mine, is everything in ghost/content/data ghost:ghost and writable?

Be the first one to answer this question.