# Not reading /var/lib/docker/containers?

**URL:** <https://discuss.elastic.co/t/not-reading-var-lib-docker-containers/162446>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 30, 2018, 2:13pm UTC](https://discuss.elastic.co/t/not-reading-var-lib-docker-containers/162446 "2018-12-30T14:13:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethrbunny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ethrbunny/32/34603_2.png) [@ethrbunny](https://discuss.elastic.co/u/ethrbunny)\
**Post date:** [December 30, 2018, 2:13pm UTC](https://discuss.elastic.co/t/not-reading-var-lib-docker-containers/162446/1 "2018-12-30T14:13:04Z")

</div>

Am hoping to use filebeat to get stdout from my containers running on kubernetes. So far no luck here.

Looking at filesystem on kubernetes hosts I see that /var/lib/docker/containers has permissions only for root

```
drwx------ 4 root root

```

Is it possible that this is preventing filebeat from accessing the logs contained inside those folders?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [January 2, 2019, 1:28pm UTC](https://discuss.elastic.co/t/not-reading-var-lib-docker-containers/162446/2 "2019-01-02T13:28:56Z")

</div>

In kubernetes we normally run filebeat as a daemon-set + mount in /var/lib/docker/containers, so filebeat is somewhat isolated and can read the logs.

If filebeat is not running as root, but files are root only, the it's a permissions problem.

Also see [docs](https://www.elastic.co/guide/en/beats/filebeat/6.5/running-on-kubernetes.html)  
and default deployment configs for filebeat as [kubernetes daemonset](https://github.com/elastic/beats/tree/master/deploy/kubernetes/filebeat).

---

<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 30, 2019, 1:29pm UTC](https://discuss.elastic.co/t/not-reading-var-lib-docker-containers/162446/3 "2019-01-30T13:29:04Z")

</div>

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