Wrong Directory Permissions - www-data

Hallo,

ich habe eine Nextcloud-Instanz über docker-compose laufen. Nachdem ich meinen Server neu gestartet hatte funktionierten plötzlich Nginx und Letsencrypt nicht mehr. Nach näheren Untersuchungen hat sich heraus gestellt, dass der Ordner certs dem User www-data gehört: drwxr-xr-x 1 www-data www-data 60 Mar 26 19:29 proxy.
Problem hierbei ist das bei somit nicht das Recht haben in das Directory zu schreiben. Beim wiederholten versuchen die Permissions mit chmod zu ändern, wir mir als root Nutzer gesagt, dass ich dazu nicht die Rechte hab.

Meine Frage also: Wie kann ich die Zugriffsrechte zurück auf root setzen?

Danke im Voraus
Viele Grüße
Nick

For clarification: the ‘certs’ folder is on the Linux host or in one of the containers?

In each container you should have root permissions and overwrite any OS file, including the certs folder.

Alternatively, try to login with www-data; but as that’s a system account, you might not know the password and not want to change it, other wise the http server might stop running altogether.

Please, post on which OS and version Docker is running. That gives more context.

I am running a docker container, who mounts a nfs share inside of it (the certs folder). Even inside the container, I still have no rights to change the folders permissions.

Running on Ubuntu-Server: 19

Regards