# Error with bulk upload & Role permissions

**URL:** <https://discuss.elastic.co/t/error-with-bulk-upload-role-permissions/227363>\
**Category:** Elasticsearch\
**Created:** [April 9, 2020, 3:54pm UTC](https://discuss.elastic.co/t/error-with-bulk-upload-role-permissions/227363 "2020-04-09T15:54:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hogbinj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hogbinj/32/14744_2.png) [@hogbinj](https://discuss.elastic.co/u/hogbinj)\
**Post date:** [April 9, 2020, 3:54pm UTC](https://discuss.elastic.co/t/error-with-bulk-upload-role-permissions/227363/1 "2020-04-09T15:54:03Z")

</div>

I'm trying to bulk upload using a specific user/role and getting an error I don't understand given my configuration. Other than a .yml security file (which I'm not using) I can't work out how to set the specific permission [indices:data/write/bulk[s]].

Could anybody suggest where I look next please

Im using op\_type = 'index' in the bulk upload

The error is

> security\_exception in 5E8CD8DB00008C4F292405AE-1586288859, uploading to bbg-parse-msg-v3-20200409153639054771 because action [indices:data/write/bulk[s]] is unauthorized for user [bbg-ingest]

The role is:

```auto
    {
  "bloomberg-ingest" : {
    "cluster" : [
      "monitor"
    ],
    "indices" : [
      {
        "names" : [
          "bbg-parse-msg*",
          "bbg-parse-ib*"
        ],
        "privileges" : [
          "write"
        ],
        "field_security" : {
          "grant" : [
            "*"
          ],
          "except" : []
        },
        "allow_restricted_indices" : false
      }
    ],
    "applications" : [],
    "run_as" : [],
    "metadata" : { },
    "transient_metadata" : {
      "enabled" : true
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![hogbinj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hogbinj/32/14744_2.png) [@hogbinj](https://discuss.elastic.co/u/hogbinj)\
**Post date:** [April 9, 2020, 4:03pm UTC](https://discuss.elastic.co/t/error-with-bulk-upload-role-permissions/227363/2 "2020-04-09T16:03:22Z")

</div>

Huh. just worked out the answer.

I was using an Alias to update the latest index that is not in the same format as the underlying index name

So I was posting to IPS\_data\_input\_bbg\_ib which is an alias of bbg-parse-ib-v4-20200409

I've changed the post to be the index itself and now it works

The Alias does not match the mask in Indices (I guess as it is not an Index) however the Alias points at the index!! And the error message is a little oblique.

---

<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:** [May 7, 2020, 4:03pm UTC](https://discuss.elastic.co/t/error-with-bulk-upload-role-permissions/227363/3 "2020-05-07T16:03:24Z")

</div>

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