Issues mounting NFS as data dir

Dear Support,

I’m trying to run Nextcloud container, using NAS as data dir. Mounted via NFS4

This is a project for home.

Nextcloud version: 23.0.0.10
Operating system and version: suse opensuse opensuse-tumbleweed
Apache or nginx version: 2?
PHP version: 8.0-apache-bullseye

The issue you are facing:
After starting container, I cannot write/read to NFS dir.

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

Steps to replicate it:

  1. Pull container image: podman pull nextcloud
  2. Create two volumes: nexcloud-data and nextcloud-config
  3. Run container:
podman run \
  --name=nextcloud \
  --env TZ=Europe/Amsterdam \
  --publish 80:80 \
  --volume nextcloud-config:/var/www/html \
  --volume nextcloud-data:/var/www/html/data \
  nextcloud
  1. Mount NFS: mount -a
    (fstab: nfs-server:/volume1/nextcloud-data /var/lib/containers/storage/volumes/nextcloud-data/_data/admin/files/nfs nfs defaults 0 0)
  2. check permissions:
/v/l/c/s/v/n/_/a/files# ls
total 17M
drwxr-xr-x 1 33 33  134 Dec  4 14:42  Documents
drwxrwxrwx 3 33 33 4.0K Dec  4 14:47  nfs
-rw-r--r-- 1 33 33 3.8M Dec  4 14:42 'Nextcloud intro.mp4'
-rw-r--r-- 1 33 33  12M Dec  4 14:42 'Nextcloud Manual.pdf'
-rw-r--r-- 1 33 33  50K Dec  4 14:42  Nextcloud.png
drwxr-xr-x 1 33 33  206 Dec  4 14:42  Photos
-rw-r--r-- 1 33 33    1 Dec  4 15:26  Readme.md
-rw-r--r-- 1 33 33 954K Dec  4 14:42 'Reasons to use Nextcloud.pdf'
drwxr-xr-x 1 33 33  348 Dec  4 14:42  Templates
  1. via command like I can see files in nfs, but via Nextcloud browser I don’t see any nfs dir or

  2. Restarted nextcloud container, dir. is still not shown in web-client.

  3. chown dir. to 33:33 did not help either

The output of your Nextcloud log in Admin > Logging:

OCP\Files\NotPermittedException: Could not create folder

    /var/www/html/lib/private/Files/AppData/AppData.php - line 156:

    OC\Files\Node\Folder->newFolder("0")

    /var/www/html/apps/theming/lib/ImageManager.php - line 156:

    OC\Files\AppData\AppData->newFolder("0")

    /var/www/html/apps/theming/lib/ImageManager.php - line 171:

    OCA\Theming\ImageManager->getCacheFolder()

    /var/www/html/apps/theming/lib/Controller/IconController.php - line 90:

    OCA\Theming\ImageManager->getCachedImage("icon-core-f ... g")

    /var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 217:

    OCA\Theming\Controller\IconController->getThemedIcon("core", "filetypes/application-pdf.svg")

    /var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 126:

    OC\AppFramework\Http\Dispatcher->executeController(OCA\Theming\ ... {}, "getThemedIcon")

    /var/www/html/lib/private/AppFramework/App.php - line 157:

    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Theming\ ... {}, "getThemedIcon")

    /var/www/html/lib/private/Route/Router.php - line 302:

    OC\AppFramework\App::main("OCA\\Themin ... r", "getThemedIcon", OC\AppFramew ... {}, { app: "core ... "})

    /var/www/html/lib/base.php - line 1006:

    OC\Route\Router->match("/apps/themi ... g")

    /var/www/html/index.php - line 36:

    OC::handleRequest()

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,
    ),
  ),
  'instanceid' => '***',
  'passwordsalt' => ' '***',
  'secret' => ' '***',
  'trusted_domains' =>
  array (
    0 => '192.168.1.*',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'sqlite3',
  'version' => '23.0.0.10',
  'overwrite.cli.url' => 'http://192.168.1.*',
  'installed' => true,
);PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

$ cat ../alternatives.log
update-alternatives 2021-11-17 06:45:08: run with --install /usr/bin/lzma lzma /usr/bin/xz 20 --slave /usr/share/man/man1/lzma.1.gz lzma.1.gz /usr/share/man/man1/xz.1.gz --slave /usr/bin/unlzma unlzma /usr/bin/unxz --slave /usr/share/man/man1/unlzma.1.gz unlzma.1.gz /usr/share/man/man1/unxz.1.gz --slave /usr/bin/lzcat lzcat /usr/bin/xzcat --slave /usr/share/man/man1/lzcat.1.gz lzcat.1.gz /usr/share/man/man1/xzcat.1.gz --slave /usr/bin/lzmore lzmore /usr/bin/xzmore --slave /usr/share/man/man1/lzmore.1.gz lzmore.1.gz /usr/share/man/man1/xzmore.1.gz --slave /usr/bin/lzless lzless /usr/bin/xzless --slave /usr/share/man/man1/lzless.1.gz lzless.1.gz /usr/share/man/man1/xzless.1.gz --slave /usr/bin/lzdiff lzdiff /usr/bin/xzdiff --slave /usr/share/man/man1/lzdiff.1.gz lzdiff.1.gz /usr/share/man/man1/xzdiff.1.gz --slave /usr/bin/lzcmp lzcmp /usr/bin/xzcmp --slave /usr/share/man/man1/lzcmp.1.gz lzcmp.1.gz /usr/share/man/man1/xzcmp.1.gz --slave /usr/bin/lzgrep lzgrep /usr/bin/xzgrep --slave /usr/share/man/man1/lzgrep.1.gz lzgrep.1.gz /usr/share/man/man1/xzgrep.1.gz --slave /usr/bin/lzegrep lzegrep /usr/bin/xzegrep --slave /usr/share/man/man1/lzegrep.1.gz lzegrep.1.gz /usr/share/man/man1/xzegrep.1.gz --slave /usr/bin/lzfgrep lzfgrep /usr/bin/xzfgrep --slave /usr/share/man/man1/lzfgrep.1.gz lzfgrep.1.gz /usr/share/man/man1/xzfgrep.1.gz
update-alternatives 2021-11-17 06:45:08: link group lzma updated to point to /usr/bin/xz
update-alternatives 2021-11-17 06:45:10: run with --quiet --install /lib/cpp cpp /usr/bin/cpp 10
update-alternatives 2021-11-17 06:45:10: link group cpp updated to point to /usr/bin/cpp
update-alternatives 2021-11-17 06:45:10: run with --quiet --install /usr/bin/cc cc /usr/bin/gcc 20
update-alternatives 2021-11-17 06:45:10: link group cc updated to point to /usr/bin/gcc
update-alternatives 2021-11-17 06:45:10: run with --quiet --install /usr/bin/c89 c89 /usr/bin/c89-gcc 20 --slave /usr/share/man/man1/c89.1.gz c89.1.gz /usr/share/man/man1/c89-gcc.1.gz
update-alternatives 2021-11-17 06:45:10: link group c89 updated to point to /usr/bin/c89-gcc
update-alternatives 2021-11-17 06:45:10: run with --quiet --install /usr/bin/c99 c99 /usr/bin/c99-gcc 20 --slave /usr/share/man/man1/c99.1.gz c99.1.gz /usr/share/man/man1/c99-gcc.1.gz
update-alternatives 2021-11-17 06:45:10: link group c99 updated to point to /usr/bin/c99-gcc
update-alternatives 2021-11-17 06:45:10: run with --install /usr/bin/c++ c++ /usr/bin/g++ 20
update-alternatives 2021-11-17 06:45:10: link group c++ updated to point to /usr/bin/g++
update-alternatives 2021-11-17 06:50:59: run with --quiet --install /usr/bin/open open /usr/bin/run-mailcap 30 --slave /usr/share/man/man1/open.1.gz open.1.gz /usr/share/man/man1/run-mailcap.1.gz
update-alternatives 2021-11-17 06:50:59: link group open updated to point to /usr/bin/run-mailcap
update-alternatives 2021-11-19 21:49:11: run with --quiet --install /usr/bin/pinentry pinentry /usr/bin/pinentry-curses 50 --slave /usr/share/man/man1/pinentry.1.gz pinentry.1.gz /usr/share/man/man1/pinentry-curses.1.gz
update-alternatives 2021-11-19 21:49:11: link group pinentry updated to point to /usr/bin/pinentry-curses
update-alternatives 2021-11-19 21:49:25: run with --quiet --remove pinentry /usr/bin/pinentry-curses
update-alternatives 2021-11-19 21:49:25: link group pinentry fully removed
update-alternatives 2021-11-19 21:49:36: run with --install /usr/bin/write write /usr/bin/write.ul 100 --slave /usr/share/man/man1/write.1.gz write.1.gz /usr/share/man/man1/write.ul.1.gz
update-alternatives 2021-11-19 21:49:36: link group write updated to point to /usr/bin/write.ul
update-alternatives 2021-11-19 21:49:37: run with --install /usr/bin/automake automake /usr/bin/automake-1.16 34 --slave /usr/bin/aclocal aclocal /usr/bin/aclocal-1.16 --slave /usr/share/man/man1/automake.1.gz automake.1.gz /usr/share/man/man1/automake-1.16.1.gz --slave /usr/share/man/man1/aclocal.1.gz aclocal.1.gz /usr/share/man/man1/aclocal-1.16.1.gz
update-alternatives 2021-11-19 21:49:37: link group automake updated to point to /usr/bin/automake-1.16
update-alternatives 2021-11-19 21:52:06: run with --remove write /usr/bin/write.ul
update-alternatives 2021-11-19 21:52:06: link group write fully removed
update-alternatives 2021-11-19 21:52:08: run with --remove automake /usr/bin/automake-1.16
update-alternatives 2021-11-19 21:52:08: link group automake fully removed
update-alternatives 2021-12-02 07:07:02: run with --install /usr/bin/automake automake /usr/bin/automake-1.16 34 --slave /usr/bin/aclocal aclocal /usr/bin/aclocal-1.16 --slave /usr/share/man/man1/automake.1.gz automake.1.gz /usr/share/man/man1/automake-1.16.1.gz --slave /usr/share/man/man1/aclocal.1.gz aclocal.1.gz /usr/share/man/man1/aclocal-1.16.1.gz
update-alternatives 2021-12-02 07:07:02: link group automake updated to point to /usr/bin/automake-1.16
update-alternatives 2021-12-02 07:09:03: run with --remove automake /usr/bin/automake-1.16
update-alternatives 2021-12-02 07:09:03: link group automake fully removed
update-alternatives 2021-12-02 07:19:21: run with --quiet --install /usr/bin/pinentry pinentry /usr/bin/pinentry-curses 50 --slave /usr/share/man/man1/pinentry.1.gz pinentry.1.gz /usr/share/man/man1/pinentry-curses.1.gz
update-alternatives 2021-12-02 07:19:21: link group pinentry updated to point to /usr/bin/pinentry-curses
update-alternatives 2021-12-02 07:23:12: run with --quiet --remove pinentry /usr/bin/pinentry-curses
update-alternatives 2021-12-02 07:23:12: link group pinentry fully removed
Initializing nextcloud 23.0.0.10 ...
Initializing finished
New nextcloud instance
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.88.0.8. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.88.0.8. Set the 'ServerName' directive globally to suppress this message
[Sat Dec 04 15:39:39.944375 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.51 (Debian) PHP/8.0.13 configured -- resuming normal operations
[Sat Dec 04 15:39:39.944587 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
192.168.1.10 - - [04/Dec/2021:15:41:08 +0100] "GET / HTTP/1.1" 200 4027 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/css/guest.css?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 6190 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/img/actions/caret-white.svg HTTP/1.1" 200 679 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/img/logo/logo.svg?v=1 HTTP/1.1" 200 1351 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/img/background.png?v=2 HTTP/1.1" 200 10154 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/img/actions/toggle.svg?v=1 HTTP/1.1" 200 844 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/img/actions/info-white.svg?v=2 HTTP/1.1" 200 921 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/img/actions/checkbox-mark-white.svg HTTP/1.1" 200 781 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/js/dist/install.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 93552 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/js/dist/main.js?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 487568 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/img/favicon.ico HTTP/1.1" 200 3809 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/img/favicon-touch.png HTTP/1.1" 200 4729 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:41:09 +0100] "GET /core/vendor/zxcvbn/dist/zxcvbn.js HTTP/1.1" 200 400231 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
::1 - - [04/Dec/2021:15:41:15 +0100] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.51 (Debian) PHP/8.0.13 (internal dummy connection)"
::1 - - [04/Dec/2021:15:41:16 +0100] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.51 (Debian) PHP/8.0.13 (internal dummy connection)"
192.168.1.10 - - [04/Dec/2021:15:41:59 +0100] "POST /index.php HTTP/1.1" 302 1146 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:06 +0100] "GET /index.php/apps/dashboard/ HTTP/1.1" 200 10758 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /apps/files_rightclick/css/app.css?v=62abc69f-0 HTTP/1.1" 200 782 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /css/core/8f4e-d7b3-server.css?v=b92d206521717ac032f8aa58d3c7ff2f-7515ecc1-0 HTTP/1.1" 200 20852 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /css/text/1321-d7b3-icons.css?v=b92d206521717ac032f8aa58d3c7ff2f-1321b4a1-0 HTTP/1.1" 200 1382 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /css/core/8f4e-d7b3-css-variables.css?v=b92d206521717ac032f8aa58d3c7ff2f-7515ecc1-0 HTTP/1.1" 200 1645 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /css/notifications/7a5a-d7b3-styles.css?v=b92d206521717ac032f8aa58d3c7ff2f-7a5a3468-0 HTTP/1.1" 200 1898 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /css/activity/96db-d7b3-style.css?v=b92d206521717ac032f8aa58d3c7ff2f-96dba882-0 HTTP/1.1" 200 2054 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /core/js/dist/files_fileinfo.js?v=7515ecc1-0 HTTP/1.1" 200 10057 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:17 +0100] "GET /core/js/dist/files_client.js?v=7515ecc1-0 HTTP/1.1" 200 43492 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /css/dashboard/baf6-d7b3-dashboard.css?v=b92d206521717ac032f8aa58d3c7ff2f-baf661bc-0 HTTP/1.1" 200 1543 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:17 +0100] "GET /core/js/backgroundjobs.js?v=7515ecc1-0 HTTP/1.1" 200 1204 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:17 +0100] "GET /apps/accessibility/js/accessibilityoca.js?v=7515ecc1-0 HTTP/1.1" 200 6183 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:17 +0100] "GET /apps/files_sharing/js/dist/main.js?v=7515ecc1-0 HTTP/1.1" 200 1670 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:17 +0100] "GET /apps/files_videoplayer/js/files_videoplayer-main.js?v=7515ecc1-0 HTTP/1.1" 200 20070 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /core/js/dist/main.js?v=7515ecc1-0 HTTP/1.1" 200 487567 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:17 +0100] "GET /apps/files/js/fileinfomodel.js?v=7515ecc1-0 HTTP/1.1" 200 1850 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:16 +0100] "GET /css/user_status/54ac-d7b3-user-status-menu.css?v=b92d206521717ac032f8aa58d3c7ff2f-54acb57a-0 HTTP/1.1" 200 1187 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
192.168.1.10 - - [04/Dec/2021:15:43:17 +0100] "GET /apps/files/js/dist/sidebar.js?v=7515ecc1-0 HTTP/1.1" 200 258131 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
^C[Sat Dec 04 16:20:30.762654 2021] [mpm_prefork:notice] [pid 1] AH00169: caught SIGTERM, shutting down