# Security Privileges - Auto Expand Replicas

**URL:** https://discuss.elastic.co/t/security-privileges-auto-expand-replicas/341555
**Category:** Elasticsearch
**Created:** [August 24, 2023, 9:09am UTC](https://discuss.elastic.co/t/security-privileges-auto-expand-replicas/341555 "2023-08-24T09:09:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tneto](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@tneto](https://discuss.elastic.co/u/tneto)
#### Post date: [August 24, 2023, 9:09am UTC](https://discuss.elastic.co/t/security-privileges-auto-expand-replicas/341555/1 "2023-08-24T09:09:46Z")

</div>

Hello.

I'm running ES version 8.1.3 and I'm facing some issues regarding "auto\_expand\_replicas"

This is my command on the console over Dev Tools.

```auto
 PUT /.kibana/_settings
{
 "index" : {
  "number_of_replicas":0,
  "auto_expand_replicas": false
 }
}

```

This is the response:

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "action [indices:admin/settings/update] is unauthorized for user [twadmin] with roles [viewer,editor,kibana_admin,superuser,apm_system,manage_index_templates,manage_all] on indices [.kibana_8.1.3_001,.kibana], this action is granted by the index privileges [manage,all]"
      }
    ],
    "type" : "security_exception",
    "reason" : "action [indices:admin/settings/update] is unauthorized for user [twadmin] with roles [viewer,editor,kibana_admin,superuser,apm_system,manage_index_templates,manage_all] on indices [.kibana_8.1.3_001,.kibana], this action is granted by the index privileges [manage,all]"
  },
  "status" : 403
}

```

So after reading through the forum, I realized that I would need to have [Manage Index Privilege](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html).

I created the following role to my user, but I still didn't succeed at changing the "auto\_expand\_replicas"

 ![Elastic Search Role](https://us1.discourse-cdn.com/elastic/original/3X/c/8/c8e18c67acd976cc1aecf95e9072e5d13a50d305.png)

Best Regards.

---

<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: [September 21, 2023, 9:10am UTC](https://discuss.elastic.co/t/security-privileges-auto-expand-replicas/341555/2 "2023-09-21T09:10:01Z")

</div>

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