# How to change security index's replica shard count?

**URL:** https://discuss.elastic.co/t/how-to-change-security-indexs-replica-shard-count/322558
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [January 5, 2023, 2:18pm UTC](https://discuss.elastic.co/t/how-to-change-security-indexs-replica-shard-count/322558 "2023-01-05T14:18:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bulent](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bulent/32/99535_2.png) [@bulent](https://discuss.elastic.co/u/bulent)
#### Post date: [January 5, 2023, 2:18pm UTC](https://discuss.elastic.co/t/how-to-change-security-indexs-replica-shard-count/322558/1 "2023-01-05T14:18:32Z")

</div>

Hi;  
I am trying to increase replica count of security index by using superuser ( elastic) like below

curl -X PUT 'http://\*\*\*\*\*\*\*\*\*\*\*\*\*\*:9212/.security-7/\_settings'   
-H 'Authorization: Basic \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*'   
-H 'Content-Type: application/json'   
-d '{  
"index" : {  
"number\_of\_replicas" : 4  
}  
}'

{"error":{"root\_cause":[{"type":"security\_exception","reason":"action [indices:admin/settings/update] is unauthorized for  
user [elastic] with effective roles [superuser] on restricted indices [.security-7], this action is granted by the index privileges [manage,all]"}],  
"type":"security\_exception","reason":"action [indices:admin/settings/update] is unauthorized for user [elastic] with effective roles [superuser] on restricted indices  
[.security-7], this action is granted by the index privileges [manage,all]"},"status":403}

Is there any method in order to perform this operation?

Thanks;  
Bülent

---

<div class="post-metadata">

### Author: ![bulent](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bulent/32/99535_2.png) [@bulent](https://discuss.elastic.co/u/bulent)
#### Post date: [January 5, 2023, 10:16pm UTC](https://discuss.elastic.co/t/how-to-change-security-indexs-replica-shard-count/322558/2 "2023-01-05T22:16:53Z")

</div>

I have found the reason at the following links

> **[What’s new in 8.0 | Elasticsearch Guide \[8.0\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.0/release-highlights.html)**

In 8.0, we’ve made several changes to protect system indices from direct access. To access a system index, you must now have the allow\_restricted\_indices permission set to true.

> **[Defining roles | Elasticsearch Guide \[8.0\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.0/defining-roles.html#roles-indices-priv)**

---

<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: [February 2, 2023, 10:17pm UTC](https://discuss.elastic.co/t/how-to-change-security-indexs-replica-shard-count/322558/3 "2023-02-02T22:17:50Z")

</div>

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