BUG: resolv.conf should be readable by non-root users

Hi

I saw this thread resolv.conf should be world-readable that is closed.
I just hit the same bug. I have a Container with an alpine image.
Running my app as non-root, it can’t resolve any hosts. After some troubleshooting I see that the resolv.conf is only readable by root.

$ fly ssh console -s -a my-app ? Select VM: arn: xxx
x:x:x:x xxxx
Connecting to x:x:x:x... complete
xxx:/var/lib/sftpgo# ls -l /etc/resolv.conf
-rwx------    1 root     root            20 Feb 18 20:22 /etc/resolv.conf

As a workaround I am running my app as root. But that is something I would like to avoid.
I’ved tried doing chmod 0644 /etc/resolv.conf in the container file also tried to replace the resolv.conf entierly via the container. But that doesn’t bite.

This might be related as well Cannot request external services.
They solved their problem by switching to an non-alpine base image.

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