Nextcloud resolv.conf with wrong Permissions

Hello, I am new here.

In the Docker Container with Nextcloud for arm64 the /etc/resolv.conf has the permissions 640. I run the container with PUID:PGID 1001:100. As root curl works fine, as User 1001 I get curl error 6 (cant resolve hostname). Changing permission to 644 solved the problem.

@wolli53332 Welcome, Please could you post some information on your setup: Host OS/Hardware - How you’ve deployed the container (plus include the parameters used)

You shouldn’t need to be touching resolv.conf within the container, if you’re having DNS issues, it’s usually down to the container not being deployed correctly or an issue with the host.

@j0nnymoe I’ve got a Rasberry Pi 4 witch Rasbian 64bit and Portainer running.

ENV
TZ Europe/Berlin, PUID 1001, PGID 100, PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin, PS1 $(whoami)@$(hostname):$(pwd)$, HOME /root, TERM xterm, NEXTCLOUD_PATH /config/www/nextcloud
Labels
build_version |Linuxserver.io version:- 19.0.1-ls92 Build-date:- 2020-08-05T07:39:20-04:00|
|maintainer |aptalca|
Port configuration: 0.0.0.0:447 443/tcp,
/srv/dev-disk-by-label-daten/AppData/Nextcloud /config
/srv/dev-disk-by-label-daten/NextcloudDaten /data
and a seperate network together with the linuxserver/letsencrypt.

I just looked into Debain, Ubuntu Server and CentOS. But I don’t know this arch Linux. If /etc/resolv.conf ist a file, its owned by root, group root. Its writable by the owner, readable by group and world readable.

When I loged into the container as root, I might use curl without a problem. When I logged into the container as user 1001, the PUID under which the container runs, curl was not able to reolve the any hostname, because the user was not able to read the resolv.conf.

please provide your actual compose or docker run command and docker logs output. You can use code blocks, hastebin, or pastebin.

0644 are the correct permissions for /etc/resolv.conf but I have never seen a dns issue in this container and it has 204million pulls…

Hello,
I also use linuxserver/letsencrypt an linuxserver/mariadb. There /etc/resolv.conf has also the permissions 0640. Letsencrypt was able to generate a certificate for my subdomain.
I used Portainer tu start it but the start is like this:
docker run --network=my-net -e TZ=Europe/Berlin -e PUID=1001 -e PGID=100 -p 447:443 --mount type=bind,src=/data,dst=/data --mount type=bind,src=/config,dst=/config linuxserver/nextcloud nextcloud

The log:
[cont-init.d] 01-envfile: exited 0.,
[cont-init.d] 10-adduser: executing… ,
,
-------------------------------------,
_ (),
| | ___ _ _,
| | / | | | / \ ,
| | _
\ | | | () |,
|| |
/ || _/,
,
,
Brought to you by linuxserver.io,
-------------------------------------,
,
To support LSIO projects visit:,

-------------------------------------,
GID/UID,
-------------------------------------,
,
User uid: 1001,
User gid: 100,
-------------------------------------,
,
[cont-init.d] 10-adduser: exited 0.,
[cont-init.d] 20-config: executing… ,
[cont-init.d] 20-config: exited 0.,
[cont-init.d] 30-keygen: executing… ,
using keys found in /config/keys,
[cont-init.d] 30-keygen: exited 0.,
[cont-init.d] 40-config: executing… ,
[cont-init.d] 40-config: exited 0.,
[cont-init.d] 50-install: executing… ,
[cont-init.d] 50-install: exited 0.,
[cont-init.d] 60-memcache: executing… ,
[cont-init.d] 60-memcache: exited 0.,
[cont-init.d] 70-aliases: executing… ,
[cont-init.d] 70-aliases: exited 0.,
[cont-init.d] 99-custom-files: executing… ,
[custom-init] no custom files found exiting…,
[cont-init.d] 99-custom-files: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
[cont-finish.d] executing container finish scripts…,
[cont-finish.d] done.,
[s6-finish] waiting for services.,
[s6-finish] sending all processes the TERM signal.,
[s6-finish] sending all processes the KILL signal and exiting.,
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.,
[s6-init] ensuring user provided files have correct perms…exited 0.,
[fix-attrs.d] applying ownership & permissions fixes…,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts…,
[cont-init.d] 01-envfile: executing… ,
[cont-init.d] 01-envfile: exited 0.,
[cont-init.d] 10-adduser: executing… ,
usermod: no changes,
,
-------------------------------------,
_ (),
| | ___ _ _,
| | / | | | / \ ,
| | _
\ | | | () |,
|| |
/ || _/,
,
,
Brought to you by linuxserver.io,
-------------------------------------,
,
To support LSIO projects visit:,

-------------------------------------,
GID/UID,
-------------------------------------,
,
User uid: 1001,
User gid: 100,
-------------------------------------,
,
[cont-init.d] 10-adduser: exited 0.,
[cont-init.d] 20-config: executing… ,
[cont-init.d] 20-config: exited 0.,
[cont-init.d] 30-keygen: executing… ,
using keys found in /config/keys,
[cont-init.d] 30-keygen: exited 0.,
[cont-init.d] 40-config: executing… ,
[cont-init.d] 40-config: exited 0.,
[cont-init.d] 50-install: executing… ,
[cont-init.d] 50-install: exited 0.,
[cont-init.d] 60-memcache: executing… ,
[cont-init.d] 60-memcache: exited 0.,
[cont-init.d] 70-aliases: executing… ,
[cont-init.d] 70-aliases: exited 1.,
[cont-init.d] 99-custom-files: executing… ,
[custom-init] no custom files found exiting…,
[cont-init.d] 99-custom-files: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,

Can you reproduce the issue if you create your container using our readme’s docker create or compose and NOT using portainer?

High,
I somehow succeded to overwrite the permissions from openmediavault. I have deleted and recreated every container and the problems are gone.
Thanks