# Cant set action.auto\_create\_index to false

**URL:** <https://discuss.elastic.co/t/cant-set-action-auto-create-index-to-false/158144>\
**Category:** Elasticsearch\
**Created:** [November 26, 2018, 9:31am UTC](https://discuss.elastic.co/t/cant-set-action-auto-create-index-to-false/158144 "2018-11-26T09:31:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacobot](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@jacobot](https://discuss.elastic.co/u/jacobot)\
**Post date:** [November 26, 2018, 9:31am UTC](https://discuss.elastic.co/t/cant-set-action-auto-create-index-to-false/158144/1 "2018-11-26T09:31:38Z")

</div>

I try

```http
PUT /_all/_settings 
{
  "action.auto_create_index": false
}

```

and I get this resposne

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "cluster_block_exception",
        "reason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
      }
    ],
    "type": "cluster_block_exception",
    "reason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
  },
  "status": 403
}

```

Then i tried

```auto
PUT _settings
{
  "index": {
    "blocks": {
      "read_only_allow_delete": "true"
    }
  }
}

```

Result of above

```auto
{
  "acknowledged": true
}

```

But that didnt change the success of the very first query

---

<div class="post-metadata">

**Author:** ![jacobot](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@jacobot](https://discuss.elastic.co/u/jacobot)\
**Post date:** [November 26, 2018, 9:42am UTC](https://discuss.elastic.co/t/cant-set-action-auto-create-index-to-false/158144/2 "2018-11-26T09:42:01Z")

</div>

Found the issue i need to put the `_all` before `_settings` in the path then it works

```json
PUT _all/_settings
{
  "index": {
    "blocks": {
      "read_only_allow_delete": "true"
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 24, 2018, 9:51am UTC](https://discuss.elastic.co/t/cant-set-action-auto-create-index-to-false/158144/3 "2018-12-24T09:51:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
