# AccessDeniedException for .dvd files

**URL:** <https://discuss.elastic.co/t/accessdeniedexception-for-dvd-files/75430>\
**Category:** Elasticsearch\
**Created:** [February 17, 2017, 4:18am UTC](https://discuss.elastic.co/t/accessdeniedexception-for-dvd-files/75430 "2017-02-17T04:18:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nethis](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@nethis](https://discuss.elastic.co/u/nethis)\
**Post date:** [February 17, 2017, 4:18am UTC](https://discuss.elastic.co/t/accessdeniedexception-for-dvd-files/75430/1 "2017-02-17T04:18:19Z")

</div>

Hi,

I am getting the below AccessDeniedException few times, why is this happening?

```
failed to execute operation for shard [[itcorrelationdata][13], node[UglfakcZQsmt1BTIBqk84g], [R], v[658], s[STARTED], a[id=sw4fwjbGRiaCfosyZZYosA]]
ElasticsearchException[failed to refresh store stats]; nested: AccessDeniedException[H:\Data\ittesprod\nodes\0\indices\itcorrelationdata\13\index\_40tj_Lucene54_0.dvd];
	at org.elasticsearch.index.store.Store$StoreStatsCache.refresh(Store.java:1532)
	at org.elasticsearch.index.store.Store$StoreStatsCache.refresh(Store.java:1517)
	at org.elasticsearch.common.util.SingleObjectCache.getOrRefresh(SingleObjectCache.java:55)
	at org.elasticsearch.index.store.Store.stats(Store.java:293)
	at org.elasticsearch.index.shard.IndexShard.storeStats(IndexShard.java:702)
	at org.elasticsearch.action.admin.indices.stats.CommonStats.<init>(CommonStats.java:134)
	at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.shardOperation(TransportIndicesStatsAction.java:165)
	at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.shardOperation(TransportIndicesStatsAction.java:47)
	at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.onShardOperation(TransportBroadcastByNodeAction.java:436)
	at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.messageReceived(TransportBroadcastByNodeAction.java:415)
	at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.messageReceived(TransportBroadcastByNodeAction.java:402)
	at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 17, 2017, 5:13am UTC](https://discuss.elastic.co/t/accessdeniedexception-for-dvd-files/75430/2 "2017-02-17T05:13:30Z")

</div>

Who owns that file and what permissions does it have? What user are you running ES as?

---

<div class="post-metadata">

**Author:** ![nethis](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@nethis](https://discuss.elastic.co/u/nethis)\
**Post date:** [February 17, 2017, 7:04am UTC](https://discuss.elastic.co/t/accessdeniedexception-for-dvd-files/75430/3 "2017-02-17T07:04:06Z")

</div>

ES is running as local system.

I didn't changed anything on the file/share permissions. Those are the files being created by ES/Lucene only.

---

<div class="post-metadata">

**Author:** ![ashit\_pupu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashit_pupu/32/101113_2.png) [@ashit\_pupu](https://discuss.elastic.co/u/ashit_pupu)\
**Post date:** [March 6, 2017, 10:06pm UTC](https://discuss.elastic.co/t/accessdeniedexception-for-dvd-files/75430/4 "2017-03-06T22:06:05Z")

</div>

Any solution for this issue. I am facing the same kind of issue when I changed my tokenizer to ngram tokenizer. The ES is working as windows service with system account. And system account is having all the permission to write to the folder. Earlier I never encountered this issue. To test something I changed my tokenizer to Ngram tokenizer and this issue starts to occur. At the same time the created index faces an issue of shard getting de-allocated time and again and I have to delete the index to bring back the cluster to green again . Any help or suggestion will be greatly [appreciated.ES](http://appreciated.ES) version which I am using is ES 2.3.3 .Adding the log here

```
 [2017-03-06 21:28:45,373][DEBUG][action.admin.indices.stats] [sesseri02128_slave_1] [indices:monitor/stats] failed to execute operation for shard [[er_sl_ngam_test][0], node[eqJmzy9tQliGvSfdVO6X1Q], [R], v[6], s[INITIALIZING], a[id=eVRtFS-USBCmB5cDubuysg], unassigned_info[[reason=NODE_LEFT], at[2017-03-06T20:22:46.909Z], details[node_left[dTDN50s9RtefCUzJ2WFtBA]]], expected_shard_size[7246282300]]
ElasticsearchException[failed to refresh store stats]; nested: AccessDeniedException[E:\elasticsearch-2.3.3_NiteshCluster_Slave1\data\metis_dev_cluster\nodes\0\indices\er_sl_ngam_test\0\index\_1ag_Lucene54_0.dvd];
	at org.elasticsearch.index.store.Store$StoreStatsCache.refresh(Store.java:1532)
	at org.elasticsearch.index.store.Store$StoreStatsCache.refresh(Store.java:1517)
	at org.elasticsearch.common.util.SingleObjectCache.getOrRefresh(SingleObjectCache.java:55)
	at org.elasticsearch.index.store.Store.stats(Store.java:293)
	at org.elasticsearch.index.shard.IndexShard.storeStats(IndexShard.java:702)
	at org.elasticsearch.action.admin.indices.stats.CommonStats.<init>(CommonStats.java:134)
	at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.shardOperation(TransportIndicesStatsAction.java:165)
	at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.shardOperation(TransportIndicesStatsAction.java:47)
	at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.onShardOperation(TransportBroadcastByNodeAction.java:420)
	at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.messageReceived(TransportBroadcastByNodeAction.java:399)
	at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.messageReceived(TransportBroadcastByNodeAction.java:386)
	at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:75)
	at org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.doRun(MessageChannelHandler.java:300)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.nio.file.AccessDeniedException: E:\elasticsearch-2.3.3_NiteshCluster_Slave1\data\metis_dev_cluster\nodes\0\indices\er_sl_ngam_test\0\index\_1ag_Lucene54_0.dvd
```

---

<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:** [April 3, 2017, 10:06pm UTC](https://discuss.elastic.co/t/accessdeniedexception-for-dvd-files/75430/5 "2017-04-03T22:06:40Z")

</div>

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