# ERROR: input state for file was not removed, CreateFile: Access is denied

**URL:** <https://discuss.elastic.co/t/error-input-state-for-file-was-not-removed-createfile-access-is-denied/187560>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 26, 2019, 11:55am UTC](https://discuss.elastic.co/t/error-input-state-for-file-was-not-removed-createfile-access-is-denied/187560 "2019-06-26T11:55:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Astarandel](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Astarandel](https://discuss.elastic.co/u/Astarandel)\
**Post date:** [June 26, 2019, 11:55am UTC](https://discuss.elastic.co/t/error-input-state-for-file-was-not-removed-createfile-access-is-denied/187560/1 "2019-06-26T11:55:10Z")

</div>

Hello,

a FileBeat on one of our machines started giving this error:

```
ERROR	log/input.go:222	input state for C:\tmp\InstalledPrograms.log was not removed: CreateFile C:\tmp\InstalledPrograms.log: Access is denied.
INFO	log/harvester.go:270	File was removed: C:\tmp\InstalledPrograms.log. Closing because close_removed is enabled.

```

There is definitely access to this file and the harvester was able to collect info a few days ago. Also, there are other machines which are able to collect data from the same location.

Any idea what might have caused this?

---

<div class="post-metadata">

**Author:** ![Astarandel](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Astarandel](https://discuss.elastic.co/u/Astarandel)\
**Post date:** [June 28, 2019, 8:41am UTC](https://discuss.elastic.co/t/error-input-state-for-file-was-not-removed-createfile-access-is-denied/187560/2 "2019-06-28T08:41:40Z")

</div>

I think that this issue occurs because the source log file is recreated every 5 minutes. Can anyone please let me know how to get around this?

Any help is appreciated!

---

<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:** [July 26, 2019, 8:41am UTC](https://discuss.elastic.co/t/error-input-state-for-file-was-not-removed-createfile-access-is-denied/187560/3 "2019-07-26T08:41:43Z")

</div>

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