logs folder permission

25 views
Skip to first unread message

ove...@gmail.com

unread,
Jan 6, 2017, 2:50:32 PM1/6/17
to Kubernetes user discussion and Q&A
Hello everyone. Everytime I create a new containers on Kubernetes, new log folders in /var/lib/docker/containers get created. The permission is automatically set to drwx------ . That doesn't allow me to correctly collect the content and read it through FluentD. Any suggestion on how to fix the situation?
Thank you so much in advance.

Rodrigo Campos

unread,
Jan 6, 2017, 3:22:24 PM1/6/17
to kubernet...@googlegroups.com
It happens also if you run the docker image on your local PC, right?

Probably you need to create it and chmod in your dockerfile, but remember that docker storage is not persistent and it gets erased every time the container is removed (on deploy, container crash, node drain, etc.)


On Friday, January 6, 2017, <ove...@gmail.com> wrote:
Hello everyone. Everytime I create a new containers on Kubernetes, new log folders in /var/lib/docker/containers get created. The permission is automatically set to drwx------  . That doesn't allow me to correctly collect the content and read it through FluentD. Any suggestion on how to fix the situation?
Thank you so much in advance.

--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Vishnu Kannan

unread,
Jan 6, 2017, 3:27:04 PM1/6/17
to Kubernetes user discussion and Q&A
`/var/lib/docker/` is managed by docker and it is not intended to be consumed outside of docker directly. IIUC, `docker logs` is the interface that users are expected to use. Is running "fluentd" as root user an option?


On Fri, Jan 6, 2017 at 12:22 PM, Rodrigo Campos <rodr...@gmail.com> wrote:
It happens also if you run the docker image on your local PC, right?

Probably you need to create it and chmod in your dockerfile, but remember that docker storage is not persistent and it gets erased every time the container is removed (on deploy, container crash, node drain, etc.)


On Friday, January 6, 2017, <ove...@gmail.com> wrote:
Hello everyone. Everytime I create a new containers on Kubernetes, new log folders in /var/lib/docker/containers get created. The permission is automatically set to drwx------  . That doesn't allow me to correctly collect the content and read it through FluentD. Any suggestion on how to fix the situation?
Thank you so much in advance.

--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.

ove...@gmail.com

unread,
Jan 6, 2017, 3:34:49 PM1/6/17
to Kubernetes user discussion and Q&A
Unfortunately FluentD runs with a user called FluentD

I think there must be a way to do what I am trying to do.

On Friday, January 6, 2017 at 12:27:04 PM UTC-8, Vishnu Kannan wrote:
> `/var/lib/docker/` is managed by docker and it is not intended to be consumed outside of docker directly. IIUC, `docker logs` is the interface that users are expected to use. Is running "fluentd" as root user an option?
>
>
>
>
> On Fri, Jan 6, 2017 at 12:22 PM, Rodrigo Campos <rodr...@gmail.com> wrote:
> It happens also if you run the docker image on your local PC, right?
>
>
> Probably you need to create it and chmod in your dockerfile, but remember that docker storage is not persistent and it gets erased every time the container is removed (on deploy, container crash, node drain, etc.)
>
>
>
> On Friday, January 6, 2017, <ove...@gmail.com> wrote:
> Hello everyone. Everytime I create a new containers on Kubernetes, new log folders in /var/lib/docker/containers get created. The permission is automatically set to drwx------  . That doesn't allow me to correctly collect the content and read it through FluentD. Any suggestion on how to fix the situation?
>
> Thank you so much in advance.
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
>
> To post to this group, send email to kubernet...@googlegroups.com.
>
> Visit this group at https://groups.google.com/group/kubernetes-users.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
>
> To post to this group, send email to kubernet...@googlegroups.com.

ove...@gmail.com

unread,
Jan 6, 2017, 3:36:47 PM1/6/17
to Kubernetes user discussion and Q&A
I don't think I can do that. Isn't Dockerfile just handling docker configuration? I don't have access to folders on the guest machine.

Rodrigo Campos

unread,
Jan 6, 2017, 5:54:40 PM1/6/17
to kubernet...@googlegroups.com
Oh, I see what you mean now. 

I don't know how to tell docker the ownership, maybe you can set a umask? Maybe there are flags too, don't know much about docker.
Reply all
Reply to author
Forward
0 new messages