Docker permission error

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 24.0.2.1
Operating system and version (eg, Ubuntu 20.04): Fedora 36 with Nextcloud in Docker
Apache or nginx version (eg, Apache 2.4.25): latest Nextcloud Docker Apache flavour
PHP version (eg, 7.4): latest Nextcloud Docker Apache flavour

The issue you are facing:

Is this the first time you’ve seen this error? Y

Steps to replicate it:

  1. Build Nextcloud Docker Apache with docker-compose
version: '3'

services:
  db:
    image: mariadb:10.5
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=
    env_file:
      - db.env

  redis:
    image: redis:alpine
    restart: always

  app:
    image: nextcloud:apache
    restart: always
    volumes:
      - nextcloud:/var/www/html
      - /mnt/HDD01/Server/Cloud:/var/www/html/data
    environment:
      - VIRTUAL_HOST=cloud.mnethome.de
      - LETSENCRYPT_HOST=
      - LETSENCRYPT_EMAIL=
      - MYSQL_HOST=db
      - REDIS_HOST=redis
    env_file:
      - db.env
    depends_on:
      - db
      - redis
    networks:
      - proxy-tier
      - default

  cron:
    image: nextcloud:apache
    restart: always
    volumes:
      - nextcloud:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - db
      - redis

  proxy:
    build: ./proxy
    restart: always
    ports:
      - 80:80
      - 443:443
    labels:
      com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
    volumes:
      - certs:/etc/nginx/certs:ro
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - /home/mat/deskminiserver/matrix/data/synapse-federation:/etc/nginx/vhost.d/matrix.mnethome.de:ro
    networks:
      - proxy-tier

  letsencrypt-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    restart: always
    volumes:
      - certs:/etc/nginx/certs
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - proxy-tier
    depends_on:
      - proxy
volumes:
  db:
  nextcloud:
  certs:
  vhost.d:
  html:

networks:
  proxy-tier:


The output of your Nextcloud log in Admin > Logging:

[Fri Jun 24 10:01:50.474275 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.53 (Debian) PHP/8.0.20 configured -- resuming normal operations
[Fri Jun 24 10:01:48.726806 2022] [mpm_prefork:notice] [pid 1] AH00170: caught SIGWINCH, shutting down gracefully
Configuring Redis as session handler
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
[Fri Jun 24 10:01:50.474307 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
[Fri Jun 24 10:01:51.580573 2022] [php:notice] [pid 40] [client 92.116.170.24:0] {"reqId":"6HVV1KGh4sqHnILXBPCL","level":3,"time":"2022-06-24T10:01:51+00:00","remoteAddr":"92.116.170.24","user":"--","app":"PHP","method":"GET","url":"/","message":"touch(): Utime failed: Permission denied at /var/www/html/lib/private/Config.php#263","userAgent":"Mozilla/5.0 (Android 10; Mobile; rv:101.0) Gecko/101.0 Firefox/101.0","version":"","exception":{"Exception":"Error","Message":"touch(): Utime failed: Permission denied at /var/www/html/lib/private/Config.php#263","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::","args":[2,"touch(): Utime failed: Permission denied","/var/www/html/lib/private/Config.php",263]},{"file":"/var/www/html/lib/private/Config.php","line":263,"function":"touch","args":["/var/www/html/config/config.php"]},{"file":"/var/www/html/lib/private/Config.php","line":143,"function":"writeData","class":"OC\\\\Config","type":"->","args":[]},{"file":"/var/www/html/lib/private/SystemConfig.php","line":142,"function":"setValue","class":"OC\\\\Config","type":"->","args":["instanceid","ocj43y234wwr"]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":906,"function":"setValue","class":"OC\\\\SystemConfig","type":"->","args":["instanceid","ocj43y234wwr"]},{"file":"/var/www/html/lib/base.php","line":427,"function":"getInstanceId","class":"OC_Util","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":659,"function":"initSession","class":"OC","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":1104,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/index.php","line":34,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
[Fri Jun 24 10:01:51.580709 2022] [php:notice] [pid 40] [client 92.116.170.24:0] {"reqId":"6HVV1KGh4sqHnILXBPCL","level":3,"time":"2022-06-24T10:01:51+00:00","remoteAddr":"92.116.170.24","user":"--","app":"PHP","method":"GET","url":"/","message":"fopen(/var/www/html/config/config.php): Failed to open stream: Permission denied at /var/www/html/lib/private/Config.php#264","userAgent":"Mozilla/5.0 (Android 10; Mobile; rv:101.0) Gecko/101.0 Firefox/101.0","version":"","exception":{"Exception":"Error","Message":"fopen(/var/www/html/config/config.php): Failed to open stream: Permission denied at /var/www/html/lib/private/Config.php#264","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::","args":[2,"fopen(/var/www/html/config/config.php): Failed to open stream: Permission denied","/var/www/html/lib/private/Config.php",264]},{"file":"/var/www/html/lib/private/Config.php","line":264,"function":"fopen","args":["/var/www/html/config/config.php","r+"]},{"file":"/var/www/html/lib/private/Config.php","line":143,"function":"writeData","class":"OC\\\\Config","type":"->","args":[]},{"file":"/var/www/html/lib/private/SystemConfig.php","line":142,"function":"setValue","class":"OC\\\\Config","type":"->","args":["instanceid","ocj43y234wwr"]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":906,"function":"setValue","class":"OC\\\\SystemConfig","type":"->","args":["instanceid","ocj43y234wwr"]},{"file":"/var/www/html/lib/base.php","line":427,"function":"getInstanceId","class":"OC_Util","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":659,"function":"initSession","class":"OC","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":1104,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/index.php","line":34,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
[Fri Jun 24 10:01:51.580811 2022] [php:notice] [pid 40] [client 92.116.170.24:0] {"reqId":"6HVV1KGh4sqHnILXBPCL","level":3,"time":"2022-06-24T10:01:51+00:00","remoteAddr":"92.116.170.24","user":"--","app":"PHP","method":"GET","url":"/","message":"chmod(): Operation not permitted at /var/www/html/lib/private/Config.php#267","userAgent":"Mozilla/5.0 (Android 10; Mobile; rv:101.0) Gecko/101.0 Firefox/101.0","version":"","exception":{"Exception":"Error","Message":"chmod(): Operation not permitted at /var/www/html/lib/private/Config.php#267","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::","args":[2,"chmod(): Operation not permitted","/var/www/html/lib/private/Config.php",267]},{"file":"/var/www/html/lib/private/Config.php","line":267,"function":"chmod","args":["/var/www/html/config/config.php",416]},{"file":"/var/www/html/lib/private/Config.php","line":143,"function":"writeData","class":"OC\\\\Config","type":"->","args":[]},{"file":"/var/www/html/lib/private/SystemConfig.php","line":142,"function":"setValue","class":"OC\\\\Config","type":"->","args":["instanceid","ocj43y234wwr"]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":906,"function":"setValue","class":"OC\\\\SystemConfig","type":"->","args":["instanceid","ocj43y234wwr"]},{"file":"/var/www/html/lib/base.php","line":427,"function":"getInstanceId","class":"OC_Util","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":659,"function":"initSession","class":"OC","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":1104,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/index.php","line":34,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
[Fri Jun 24 10:01:51.604446 2022] [php:notice] [pid 40] [client 92.116.170.24:0] {"reqId":"6HVV1KGh4sqHnILXBPCL","level":3,"time":"2022-06-24T10:01:51+00:00","remoteAddr":"92.116.170.24","user":"--","app":"index","method":"GET","url":"/","message":"Can't write into config directory!","userAgent":"Mozilla/5.0 (Android 10; Mobile; rv:101.0) Gecko/101.0 Firefox/101.0","version":"","exception":{"Exception":"OCP\\\\HintException","Message":"Can't write into config directory!","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Config.php","line":143,"function":"writeData","class":"OC\\\\Config","type":"->","args":[]},{"file":"/var/www/html/lib/private/SystemConfig.php","line":142,"function":"setValue","class":"OC\\\\Config","type":"->","args":["instanceid","ocj43y234wwr"]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":906,"function":"setValue","class":"OC\\\\SystemConfig","type":"->","args":["instanceid","ocj43y234wwr"]},{"file":"/var/www/html/lib/base.php","line":427,"function":"getInstanceId","class":"OC_Util","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":659,"function":"initSession","class":"OC","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":1104,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/index.php","line":34,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Config.php","Line":271,"Hint":"This can usually be fixed by giving the webserver write access to the config directory.","CustomMessage":"--"}}
[Fri Jun 24 10:01:51.604579 2022] [php:notice] [pid 40] [client 92.116.170.24:0] {"reqId":"6HVV1KGh4sqHnILXBPCL","level":3,"time":"2022-06-24T10:01:51+00:00","remoteAddr":"92.116.170.24","user":"--","app":"index","method":"GET","url":"/","message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [14] unable to open database file","userAgent":"Mozilla/5.0 (Android 10; Mobile; rv:101.0) Gecko/101.0 Firefox/101.0","version":"","exception":{"Exception":"Doctrine\\\\DBAL\\\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [14] unable to open database file","Code":14,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1519,"function":"connect","class":"OC\\\\DB\\\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1041,"function":"getWrappedConnection","class":"Doctrine\\\\DBAL\\\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\\\DBAL\\\\Connection","type":"->","args":["SELECT * FROM \\"oc_appconfig\\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":345,"function":"executeQuery","class":"OC\\\\DB\\\\Connection","type":"->","args":["SELECT * FROM \\"oc_appconfig\\"",[],[]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":281,"function":"execute","class":"Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":411,"function":"execute","class":"OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":176,"function":"loadConfigValues","class":"OC\\\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":367,"function":"getApps","class":"OC\\\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":127,"function":"getValues","class":"OC\\\\AppConfig","type":"->","args":[false,"enabled"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":216,"function":"getInstalledAppsValues","class":"OC\\\\App\\\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":286,"function":"isEnabledForUser","class":"OC\\\\App\\\\AppManager","type":"->","args":["theming"]},{"file":"/var/www/html/index.php","line":44,"function":"printErrorPage","class":"OC_Template","type":"::","args":["Can't write into config directory!","This can usually be fixed by giving the webserver write access to the config directory.",503]}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"CustomMessage":"--"}}
[Fri Jun 24 10:01:51.620594 2022] [php:notice] [pid 40] [client 92.116.170.24:0] {"reqId":"6HVV1KGh4sqHnILXBPCL","level":3,"time":"2022-06-24T10:01:51+00:00","remoteAddr":"92.116.170.24","user":"--","app":"PHP","method":"GET","url":"/","message":"fopen(/var/www/html/data/nextcloud.log): Failed to open stream: Permission denied at /var/www/html/lib/private/Log/File.php#84","userAgent":"Mozilla/5.0 (Android 10; Mobile; rv:101.0) Gecko/101.0 Firefox/101.0","version":""}
92.116.170.24 - - [24/Jun/2022:10:01:51 +0000] "GET / HTTP/1.1" 500 3105 "-" "Mozilla/5.0 (Android 10; Mobile; rv:101.0) Gecko/101.0 Firefox/101.0"
92.116.170.24 - - [24/Jun/2022:10:01:52 +0000] "GET /core/l10n/de_DE.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 19799 "-" "Mozilla/5.0 (Android 10; Mobile; rv:101.0) Gecko/101.0 Firefox/101.0"

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'redis',
    'password' => '',
    'port' => 6379,
  ),
  'instanceid' => 'ocjzk8ttm8sg',
  'passwordsalt' => '',
  'secret' => 'C/+cqH4lj',
  'overwriteprotocol' => 'https',
  'trusted_domains' =>
  array (
    0 => 'cloud.xxx.de',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '24.0.2.1',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'mail_from_address' => '',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'smtp.variomedia.de',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '465',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'maintenance' => false,
  'loglevel' => 2,
);

Any ideas, why the docker container thinks, that it does not have permissions?
I changed the files also from user “root” to “www-data”, which lead to the fact that at least some part of the website are loading. But still it is not fully working. :frowning:

Best regards

most likely because it has no permissions to change config.php (in this case):

your screenshot shouws config folder has right permissions, but maybe the files do not? please double check.

Oke, that seems to fix a bit. Now some of the errors are gone.

Anyways there seems to be something wrong with my data folder:

[Fri Jun 24 19:32:02.879483 2022] [php:notice] [pid 43] [client 92.116.170.24:0] {"reqId":"ogvaXXzYji95po3D8Fba","level":3,"time":"2022-06-24T19:32:02+00:00","remoteAddr":"92.116.170.24","user":"--","app":"PHP","method":"REPORT","url":"/remote.php/dav/calendars/xxx/app-generated--deck--board-1/","message":"fopen(/var/www/html/data/data_dir_writability_test_62b61132d6819.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","userAgent":"Mozilla/5.0","version":"24.0.2.1","exception":{"Exception":"Error","Message":"fopen(/var/www/html/data/data_dir_writability_test_62b61132d6819.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::","args":[2,"fopen(/var/www/html/data/data_dir_writability_test_62b61132d6819.tmp): Failed to open stream: Permission denied","/var/www/html/lib/private/legacy/OC_Util.php",580]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":580,"function":"fopen","args":["/var/www/html/data/data_dir_writability_test_62b61132d6819.tmp","w"]},{"file":"/var/www/html/lib/base.php","line":670,"function":"checkServer","class":"OC_Util","type":"::","args":[{"__class__":"OC\\\\SystemConfig"}]},{"file":"/var/www/html/lib/base.php","line":1104,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/remote.php","line":114,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
[Fri Jun 24 19:32:03.013269 2022] [php:notice] [pid 43] [client 92.116.170.24:0] {"reqId":"ogvaXXzYji95po3D8Fba","level":3,"time":"2022-06-24T19:32:03+00:00","remoteAddr":"92.116.170.24","user":"--","app":"PHP","method":"REPORT","url":"/remote.php/dav/calendars/xxx/app-generated--deck--board-1/","message":"fopen(/var/www/html/data/nextcloud.log): Failed to open stream: Permission denied at /var/www/html/lib/private/Log/File.php#84","userAgent":"Mozilla/5.0","version":"24.0.2.1"}
92.116.170.24 - xxx [24/Jun/2022:19:32:02 +0000] "REPORT /remote.php/dav/calendars/ xxx /app-generated--deck--board-1/ HTTP/1.1" 503 1172 "-" "Mozilla/5.0"
[Fri Jun 24 19:32:23.521240 2022] [php:notice] [pid 44] [client 95.91.217.94:0] {"reqId":"Aliy1icKnYp26z66mZj3","level":3,"time":"2022-06-24T19:32:23+00:00","remoteAddr":"95.91.217.94","user":"--","app":"PHP","method":"GET","url":"/index.php/204","message":"fopen(/var/www/html/data/data_dir_writability_test_62b611477f1c2.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.19.1","version":"24.0.2.1","exception":{"Exception":"Error","Message":"fopen(/var/www/html/data/data_dir_writability_test_62b611477f1c2.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::","args":[2,"fopen(/var/www/html/data/data_dir_writability_test_62b611477f1c2.tmp): Failed to open stream: Permission denied","/var/www/html/lib/private/legacy/OC_Util.php",580]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":580,"function":"fopen","args":["/var/www/html/data/data_dir_writability_test_62b611477f1c2.tmp","w"]},{"file":"/var/www/html/lib/base.php","line":670,"function":"checkServer","class":"OC_Util","type":"::","args":[{"__class__":"OC\\\\SystemConfig"}]},{"file":"/var/www/html/lib/base.php","line":1104,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/index.php","line":34,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
[Fri Jun 24 19:32:23.547487 2022] [php:notice] [pid 44] [client 95.91.217.94:0] {"reqId":"Aliy1icKnYp26z66mZj3","level":3,"time":"2022-06-24T19:32:23+00:00","remoteAddr":"95.91.217.94","user":"--","app":"PHP","method":"GET","url":"/index.php/204","message":"fopen(/var/www/html/data/nextcloud.log): Failed to open stream: Permission denied at /var/www/html/lib/private/Log/File.php#84","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.19.1","version":"24.0.2.1"}
95.91.217.94 - - [24/Jun/2022:19:32:23 +0000] "GET /index.php/204 HTTP/1.1" 503 1831 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1"
[Fri Jun 24 19:32:23.969591 2022] [php:notice] [pid 45] [client 163.116.178.118:0] {"reqId":"CMBJ7iPPCWFJDHfduTQz","level":3,"time":"2022-06-24T19:32:23+00:00","remoteAddr":"163.116.178.118","user":"--","app":"PHP","method":"GET","url":"/","message":"fopen(/var/www/html/data/data_dir_writability_test_62b61147ec957.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"24.0.2.1","exception":{"Exception":"Error","Message":"fopen(/var/www/html/data/data_dir_writability_test_62b61147ec957.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::","args":[2,"fopen(/var/www/html/data/data_dir_writability_test_62b61147ec957.tmp): Failed to open stream: Permission denied","/var/www/html/lib/private/legacy/OC_Util.php",580]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":580,"function":"fopen","args":["/var/www/html/data/data_dir_writability_test_62b61147ec957.tmp","w"]},{"file":"/var/www/html/lib/base.php","line":670,"function":"checkServer","class":"OC_Util","type":"::","args":[{"__class__":"OC\\\\SystemConfig"}]},{"file":"/var/www/html/lib/base.php","line":1104,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/index.php","line":34,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
[Fri Jun 24 19:32:23.997234 2022] [php:notice] [pid 45] [client 163.116.178.118:0] {"reqId":"CMBJ7iPPCWFJDHfduTQz","level":3,"time":"2022-06-24T19:32:23+00:00","remoteAddr":"163.116.178.118","user":"--","app":"PHP","method":"GET","url":"/","message":"fopen(/var/www/html/data/nextcloud.log): Failed to open stream: Permission denied at /var/www/html/lib/private/Log/File.php#84","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"24.0.2.1"}
163.116.178.118 - - [24/Jun/2022:19:32:23 +0000] "GET / HTTP/1.1" 503 1250 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0"
[Fri Jun 24 19:32:24.103860 2022] [php:notice] [pid 41] [client 163.116.178.118:0] {"reqId":"ce960n0vaD5vbFmBEpnU","level":3,"time":"2022-06-24T19:32:24+00:00","remoteAddr":"163.116.178.118","user":"--","app":"PHP","method":"GET","url":"/favicon.ico","message":"fopen(/var/www/html/data/data_dir_writability_test_62b61148193a7.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"24.0.2.1","exception":{"Exception":"Error","Message":"fopen(/var/www/html/data/data_dir_writability_test_62b61148193a7.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::","args":[2,"fopen(/var/www/html/data/data_dir_writability_test_62b61148193a7.tmp): Failed to open stream: Permission denied","/var/www/html/lib/private/legacy/OC_Util.php",580]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":580,"function":"fopen","args":["/var/www/html/data/data_dir_writability_test_62b61148193a7.tmp","w"]},{"file":"/var/www/html/lib/base.php","line":670,"function":"checkServer","class":"OC_Util","type":"::","args":[{"__class__":"OC\\\\SystemConfig"}]},{"file":"/var/www/html/lib/base.php","line":1104,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/index.php","line":34,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
[Fri Jun 24 19:32:24.129744 2022] [php:notice] [pid 41] [client 163.116.178.118:0] {"reqId":"ce960n0vaD5vbFmBEpnU","level":3,"time":"2022-06-24T19:32:24+00:00","remoteAddr":"163.116.178.118","user":"--","app":"PHP","method":"GET","url":"/favicon.ico","message":"fopen(/var/www/html/data/nextcloud.log): Failed to open stream: Permission denied at /var/www/html/lib/private/Log/File.php#84","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"24.0.2.1"}
163.116.178.118 - - [24/Jun/2022:19:32:24 +0000] "GET /favicon.ico HTTP/1.1" 503 1250 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0"
[Fri Jun 24 19:32:26.540378 2022] [php:notice] [pid 46] [client 92.116.170.24:0] {"reqId":"J59dvBv3iYdnTaa91vT4","level":3,"time":"2022-06-24T19:32:26+00:00","remoteAddr":"92.116.170.24","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/calendars/ xxx /personal/","message":"fopen(/var/www/html/data/data_dir_writability_test_62b6114a83c52.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","userAgent":"DAVx5/4.2.1-ose (2022/05/08; dav4jvm; okhttp/4.9.3) Android/10","version":"24.0.2.1","exception":{"Exception":"Error","Message":"fopen(/var/www/html/data/data_dir_writability_test_62b6114a83c52.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#580","Code":0,"Trace":[{"function":"onError","class":"OC\\\\Log\\\\ErrorHandler","type":"::","args":[2,"fopen(/var/www/html/data/data_dir_writability_test_62b6114a83c52.tmp): Failed to open stream: Permission denied","/var/www/html/lib/private/legacy/OC_Util.php",580]},{"file":"/var/www/html/lib/private/legacy/OC_Util.php","line":580,"function":"fopen","args":["/var/www/html/data/data_dir_writability_test_62b6114a83c52.tmp","w"]},{"file":"/var/www/html/lib/base.php","line":670,"function":"checkServer","class":"OC_Util","type":"::","args":[{"__class__":"OC\\\\SystemConfig"}]},{"file":"/var/www/html/lib/base.php","line":1104,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/remote.php","line":114,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
[Fri Jun 24 19:32:26.573198 2022] [php:notice] [pid 46] [client 92.116.170.24:0] {"reqId":"J59dvBv3iYdnTaa91vT4","level":3,"time":"2022-06-24T19:32:26+00:00","remoteAddr":"92.116.170.24","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/calendars/ xxx /personal/","message":"fopen(/var/www/html/data/nextcloud.log): Failed to open stream: Permission denied at /var/www/html/lib/private/Log/File.php#84","userAgent":"DAVx5/4.2.1-ose (2022/05/08; dav4jvm; okhttp/4.9.3) Android/10","version":"24.0.2.1"}
92.116.170.24 - xxx [24/Jun/2022:19:32:26 +0000] "PROPFIND /remote.php/dav/calendars/ xxx /personal/ HTTP/1.1" 503 1921 "-" "DAVx5/4.2.1-ose (2022/05/08; dav4jvm; okhttp/4.9.3) Android/10"

Docker App:

And that is the mounted data folder. I just hided the user names with the red marker: