# How to make all indices Read-only

**URL:** https://discuss.elastic.co/t/how-to-make-all-indices-read-only/70070
**Category:** Elasticsearch
**Created:** [December 27, 2016, 2:15pm UTC](https://discuss.elastic.co/t/how-to-make-all-indices-read-only/70070 "2016-12-27T14:15:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![chris2016](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@chris2016](https://discuss.elastic.co/u/chris2016)
#### Post date: [December 27, 2016, 2:15pm UTC](https://discuss.elastic.co/t/how-to-make-all-indices-read-only/70070/1 "2016-12-27T14:15:52Z")

</div>

Hi,

```
Does anyone know how to make all indices read-only? I use ELK 5.1.1 

```

and do not want to use XPACK. Is the approach below the right way to do?

+++++  
PUT your\_index/\_settings  
{  
"index": {  
"blocks.read\_only": true  
}  
}  
+++++

```
Thanks in advance

```

Cheers,  
Chris

---

<div class="post-metadata">

### Author: ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)
#### Post date: [December 27, 2016, 2:57pm UTC](https://discuss.elastic.co/t/how-to-make-all-indices-read-only/70070/2 "2016-12-27T14:57:36Z")

</div>

Hi,

I think this is the right way, but this query will only turn "your\_index" read\_only, not all indices.

Ref: [https://www.elastic.co/guide/en/elasticsearch/reference/5.1/index-modules.html#dynamic-index-settings](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/index-modules.html#dynamic-index-settings)

---

<div class="post-metadata">

### Author: ![chris2016](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@chris2016](https://discuss.elastic.co/u/chris2016)
#### Post date: [December 27, 2016, 4:05pm UTC](https://discuss.elastic.co/t/how-to-make-all-indices-read-only/70070/3 "2016-12-27T16:05:47Z")

</div>

Hi,

```
I just had a try about the index settings: blocks.read_only, but it does not work. 

```

After I have set it to true by running curl -XPUT, I still can delete index pattern from from "manage" in kibana.  
I also tried to set blocks.write and blocks.metadata to true, and they all do not work.

Does anyone have other ideas?

Cheers,  
Chris.

---

<div class="post-metadata">

### Author: ![chris2016](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@chris2016](https://discuss.elastic.co/u/chris2016)
#### Post date: [December 27, 2016, 4:15pm UTC](https://discuss.elastic.co/t/how-to-make-all-indices-read-only/70070/4 "2016-12-27T16:15:48Z")

</div>

Hi,

```
I noticed that the index is not physically deleted from elasticsearch (by checking disk) even though the index 

```

pattern has been removed in Kibana. What I actually want to achieve is that all settings/configurations on  
Kibana web interface cannot be modified or removed (at least index pattern cannot be deleted, and possible dashboards, etc).

Probably, is this a Kibana question?

Cheers,  
Chris.

---

<div class="post-metadata">

### Author: ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)
#### Post date: [December 27, 2016, 4:18pm UTC](https://discuss.elastic.co/t/how-to-make-all-indices-read-only/70070/5 "2016-12-27T16:18:18Z")

</div>

Yes you should ask this question in the Kibana forum.

---

<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: [January 24, 2017, 4:18pm UTC](https://discuss.elastic.co/t/how-to-make-all-indices-read-only/70070/6 "2017-01-24T16:18:32Z")

</div>

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