# Filebeats to read locked file

**URL:** <https://discuss.elastic.co/t/filebeats-to-read-locked-file/102826>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 5, 2017, 10:23am UTC](https://discuss.elastic.co/t/filebeats-to-read-locked-file/102826 "2017-10-05T10:23:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [October 6, 2017, 3:57pm UTC](https://discuss.elastic.co/t/filebeats-to-read-locked-file/102826/4 "2017-10-06T15:57:44Z")

</div>

Filebeat will only be able to read from the file if the application writing to it has allowed shared read access to file.

> [@Filebeat locking files](https://discuss.elastic.co/t/filebeat-locking-files/70501/2):
>
> Filebeat does not lock files. It [opens](https://github.com/elastic/beats/blob/11499e6c825618601adb801b9623fbfe0962d7fe/filebeat/input/file/file_windows.go#L93-L95) the file for reading only. And it specifies that the file can be read, written, and deleted by other applications while it has it open. It sounds like the thing that is trying to access the file is requesting exclusive access which it cannot get. It needs to allow other applications to read the file (FILE\_SHARE\_READ) when it opens the file.

---

_[View the full topic](https://discuss.elastic.co/t/filebeats-to-read-locked-file/102826)._
