# No permissions for "settings number of replicas : 0"

**URL:** <https://forum.opensearch.org/t/no-permissions-for-settings-number-of-replicas-0/3218>\
**Category:** Security\
**Created:** [July 1, 2020, 9:16am UTC](https://forum.opensearch.org/t/no-permissions-for-settings-number-of-replicas-0/3218 "2020-07-01T09:16:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jp.lee](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jp.lee](https://forum.opensearch.org/u/jp.lee)\
**Post date:** [July 1, 2020, 9:16am UTC](https://forum.opensearch.org/t/no-permissions-for-settings-number-of-replicas-0/3218/1 "2020-07-01T09:16:03Z")

</div>

Hi,

When I am executing in `Dev tool` the following request,

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

```

I get the following error.  
**I am logged in on admin account.**

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"
      }
    ],
    "type" : "security_exception",
    "reason" : "no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"
  },
  "status" : 403
}

```

But, If a specific index is set, it is applied normally.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/fc314169cc103eb899029dd0da6c7541f5b0a955.png)

```auto
PUT /winlogbeat*/_settings
{
  "index": {
    "number_of_replicas":0,
    "auto_expand_replicas": false
  }
}

```

  

We are using docker container,  
And our kibana.yml, internal\_user.yml and docker-compose.yml files setting like that

**kibana.yml**  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/d65d9430906ab41bdf08cf2a2d29804792f07a98.png)

**internal\_user.yml**  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/7454f5a1542b59ba79271c9be2e704570a0aa363.png)

**docker-compose.yml**  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/e6934e3676feb54a521e15dc99634289fbddd7e2.png)

How can I set the number of replicas?  
Any suggestions?

---

<div class="post-metadata">

**Author:** ![Anthony](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/anthony/32/9939_2.png) [@Anthony](https://forum.opensearch.org/u/Anthony)\
**Post date:** [March 16, 2021, 9:26am UTC](https://forum.opensearch.org/t/no-permissions-for-settings-number-of-replicas-0/3218/2 "2021-03-16T09:26:58Z")

</div>

Hi @jp.lee As far as I know the only index that is causing this permission error is is the security index (.opendistro\_security). The rest of the indices should work without issue. Admin user doesn’t have the permission either and to the best of my knowledge the only way to manipulate that index is to use admin certificate with curl, as follows:

```
curl -XPUT "https://localhost:9200/.opendistro_security/_settings" -H 'Content-Type: application/json' -d'{ "index": { "number_of_replicas":0, "auto_expand_replicas": false }}' -k --cert /usr/share/elasticsearch/config/kirk.pem --key /usr/share/elasticsearch/config/kirk-key.pem

```

---

<div class="post-metadata">

**Author:** ![kirubel](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@kirubel](https://forum.opensearch.org/u/kirubel)\
**Post date:** [May 2, 2023, 1:50pm UTC](https://forum.opensearch.org/t/no-permissions-for-settings-number-of-replicas-0/3218/3 "2023-05-02T13:50:05Z")

</div>

change `elasticsearch` to `opensearch` on the certificate paths.

```auto
curl -XPUT "https://localhost:9200/_all/_settings" -H 'Content-Type: application/json' -d'{ "index": { "number_of_replicas":0, "auto_expand_replicas": false }}' -k --cert /usr/share/opensearch/config/kirk.pem --key /usr/share/opensearch/config/kirk-key.pem

```
