# When creating indices and aliases in ES, user re\_test encounters errors, even though the user's index permissions are already set to all. How should this issue be handled? Thanks！

**URL:** <https://discuss.elastic.co/t/when-creating-indices-and-aliases-in-es-user-re-test-encounters-errors-even-though-the-users-index-permissions-are-already-set-to-all-how-should-this-issue-be-handled-thanks/365005>\
**Category:** Kibana\
**Tags:** elastic-stack-security, ilm-index-lifecycle-management\
**Created:** [August 16, 2024, 7:56am UTC](https://discuss.elastic.co/t/when-creating-indices-and-aliases-in-es-user-re-test-encounters-errors-even-though-the-users-index-permissions-are-already-set-to-all-how-should-this-issue-be-handled-thanks/365005 "2024-08-16T07:56:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TYQ33](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tyq33/32/136825_2.png) [@TYQ33](https://discuss.elastic.co/u/TYQ33)\
**Post date:** [August 16, 2024, 7:56am UTC](https://discuss.elastic.co/t/when-creating-indices-and-aliases-in-es-user-re-test-encounters-errors-even-though-the-users-index-permissions-are-already-set-to-all-how-should-this-issue-be-handled-thanks/365005/1 "2024-08-16T07:56:11Z")

</div>

Failed to connect to backoff(elasticsearch(ES with IP:端口)): Connection marked as failed because the onConnect callback failed: failed to create alias: {"error":{"root\_cause":[{"type":"security\_exception","reason":"action [indices:admin/create] is unauthorized for user [re\_test]"}]

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [August 20, 2024, 11:32am UTC](https://discuss.elastic.co/t/when-creating-indices-and-aliases-in-es-user-re-test-encounters-errors-even-though-the-users-index-permissions-are-already-set-to-all-how-should-this-issue-be-handled-thanks/365005/2 "2024-08-20T11:32:51Z")

</div>

Hi,

the user `re_test` needs to have a role that grants the `create_index` privilege.

Regards

---

<div class="post-metadata">

**Author:** ![TYQ33](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tyq33/32/136825_2.png) [@TYQ33](https://discuss.elastic.co/u/TYQ33)\
**Post date:** [August 23, 2024, 2:35am UTC](https://discuss.elastic.co/t/when-creating-indices-and-aliases-in-es-user-re-test-encounters-errors-even-though-the-users-index-permissions-are-already-set-to-all-how-should-this-issue-be-handled-thanks/365005/3 "2024-08-23T02:35:44Z")

</div>

Yes, but I've already granted all permissions, which should include the ability to create indices.
