# Support for indexing Windows fileshare

**URL:** <https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677>\
**Category:** Elasticsearch\
**Created:** [December 12, 2016, 8:15am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677 "2016-12-12T08:15:23Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinfy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinfy](https://discuss.elastic.co/u/martinfy)\
**Post date:** [December 12, 2016, 8:15am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/1 "2016-12-12T08:15:23Z")

</div>

Hi,

Is it possible to use Elasticsearch to index WIndows filshares? If so: are search results security trimmed based on the user executing the query?

---

<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:** [December 12, 2016, 8:31am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/2 "2016-12-12T08:31:26Z")

</div>

Elasticsearch doesn't index any file systems at all. It indexes what you feed it. If you use an external program to gather file system contents and pass to Elasticsearch you can probably build something that takes ACLs into account but it probably won't be obvious.

---

<div class="post-metadata">

**Author:** ![martinfy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinfy](https://discuss.elastic.co/u/martinfy)\
**Post date:** [December 12, 2016, 8:41am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/3 "2016-12-12T08:41:55Z")

</div>

Thanks a lot, Magnus! Excately what I needed to know.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 12, 2016, 8:45am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/4 "2016-12-12T08:45:22Z")

</div>

You can have a look at [https://github.com/dadoonet/fscrawler](https://github.com/dadoonet/fscrawler). Might help.

---

<div class="post-metadata">

**Author:** ![martinfy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinfy](https://discuss.elastic.co/u/martinfy)\
**Post date:** [December 12, 2016, 9:03am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/5 "2016-12-12T09:03:42Z")

</div>

Thank you for the tip, David! Does fscrawler support security trimming based on ACL out of the box or is this something I must implement myself?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 12, 2016, 9:21am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/6 "2016-12-12T09:21:24Z")

</div>

No. I believe it will simply fail by going in given dirs and won't index the content then. Never tested but I'll be happy to have a feedback or even better a PR on the doc if useful 🙂

---

<div class="post-metadata">

**Author:** ![martinfy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinfy](https://discuss.elastic.co/u/martinfy)\
**Post date:** [December 12, 2016, 9:37am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/7 "2016-12-12T09:37:00Z")

</div>

Thanks for such quick responses here! 🙂

Just to be clear: I was thinking about a scenario where the crawler account have full read permission to everything on the file share. Does fscrawler then look at the ACL for every file and trim search results based on permissions? I.e. if user Bob has access to file A,B but **not C** on the filshare, he should not get file C in search results.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 12, 2016, 10:07am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/8 "2016-12-12T10:07:06Z")

</div>

Ha sorry. I misunderstood.

So the `attributes_support` option collects such information about user and groups: [https://github.com/dadoonet/fscrawler#adding-file-attributes](https://github.com/dadoonet/fscrawler#adding-file-attributes)

But IIRC the code only users are added for Windows FS.

Then, you need to filter out the results in your queries depending on that information.  
Of course [X-Pack and its security module](https://www.elastic.co/guide/en/x-pack/5.1/field-and-document-access-control.html) helps simplifying that. It's a commercial plugin.

That's not exactly what you are looking for. I don't know if something is doable on FSCrawler side but I'll be happy if you have any idea to solve such a use case with it. Feel free to open an issue in the project with any proposal you can have. 😛

---

<div class="post-metadata">

**Author:** ![martinfy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinfy](https://discuss.elastic.co/u/martinfy)\
**Post date:** [December 12, 2016, 10:29am UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/9 "2016-12-12T10:29:07Z")

</div>

Thanks again, David. This is really helpfull. I'll look into it and see if this is an advantageous strategy compared to other search solutions.

---

<div class="post-metadata">

**Author:** ![martinfy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinfy](https://discuss.elastic.co/u/martinfy)\
**Post date:** [December 14, 2016, 12:40pm UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/10 "2016-12-14T12:40:10Z")

</div>

I should have mentioned this earlier, but the solution must support free text search - which it seems like fscrawler doesn't (correct me if I'm wrong).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 14, 2016, 12:54pm UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/11 "2016-12-14T12:54:20Z")

</div>

Do you mean fulltext search?

---

<div class="post-metadata">

**Author:** ![martinfy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinfy](https://discuss.elastic.co/u/martinfy)\
**Post date:** [December 14, 2016, 1:07pm UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/12 "2016-12-14T13:07:21Z")

</div>

Yes, sorry, I meant full-text search. "Free text search" is a little too directly translated from norwegian.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 14, 2016, 2:04pm UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/13 "2016-12-14T14:04:12Z")

</div>

😄

So why do you think it's not supported?

---

<div class="post-metadata">

**Author:** ![martinfy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinfy](https://discuss.elastic.co/u/martinfy)\
**Post date:** [December 14, 2016, 2:28pm UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/14 "2016-12-14T14:28:04Z")

</div>

I couldn't find anything about it, but that's probably because I used the wrong term for it... 😏 I do see that it's supported here: [https://github.com/dadoonet/fscrawler#simple-search](https://github.com/dadoonet/fscrawler#simple-search). Is there a complete list somewhere showing supported file formats?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 14, 2016, 2:43pm UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/15 "2016-12-14T14:43:34Z")

</div>

This list: [http://tika.apache.org/1.14/formats.html](http://tika.apache.org/1.14/formats.html)

I believe I should link from the README to this doc. (PR are warmly welcomed 😛 )

---

<div class="post-metadata">

**Author:** ![martinfy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@martinfy](https://discuss.elastic.co/u/martinfy)\
**Post date:** [December 14, 2016, 2:46pm UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/16 "2016-12-14T14:46:58Z")

</div>

Yes, that would be nice. Thanks again, David! 😌

---

<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:** [January 11, 2017, 2:47pm UTC](https://discuss.elastic.co/t/support-for-indexing-windows-fileshare/68677/17 "2017-01-11T14:47:33Z")

</div>

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