# Create custom indices privilege

**URL:** <https://discuss.elastic.co/t/create-custom-indices-privilege/217516>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [February 2, 2020, 9:34am UTC](https://discuss.elastic.co/t/create-custom-indices-privilege/217516 "2020-02-02T09:34:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nishant.saini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nishant.saini/32/41489_2.png) [@nishant.saini](https://discuss.elastic.co/u/nishant.saini)\
**Post date:** [February 2, 2020, 9:34am UTC](https://discuss.elastic.co/t/create-custom-indices-privilege/217516/1 "2020-02-02T09:34:03Z")

</div>

Is there a way to create a privilege for indices such that it allows to create indices and aliases but prevents index deletion? Currently if I want to give a user the following privileges :

- create index
- create alias

then I can create a role and assign `manage` privilege for indices. I can't use `create_index` privilege as I also need to give the user access to create alias. The drawback here is that `manage` privilege allows index deletion as well which I want to prevent.

Is there a way where I can create another privilege which allow index and alias creation but disallow index deletion?

---

<div class="post-metadata">

**Author:** ![nishant.saini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nishant.saini/32/41489_2.png) [@nishant.saini](https://discuss.elastic.co/u/nishant.saini)\
**Post date:** [February 3, 2020, 3:08am UTC](https://discuss.elastic.co/t/create-custom-indices-privilege/217516/2 "2020-02-03T03:08:10Z")

</div>

Anyone who can give some insights?

Any tips?

---

<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:** [March 2, 2020, 3:08am UTC](https://discuss.elastic.co/t/create-custom-indices-privilege/217516/3 "2020-03-02T03:08:13Z")

</div>

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