I can’t seem to get nextcloud to see that its data directory is indeed writable by the http user.
[root@lin-virt02 nextcloud]# sudo -u http ls -alh data
total 436K
drwxrwxrwx 1 http http 188 Nov 9 04:00 .
drwxr-x--- 16 http http 4.0K Nov 9 03:54 ..
drwxr-x--- 1 http http 76 Sep 30 02:03 admin
drwxr-x--- 1 http http 146 Sep 27 19:19 appdata_ocb0vuuo4fin
drwxr-x--- 1 http http 26 Oct 25 19:14 files_external
-rw-r--r-- 1 http http 324 Sep 27 17:43 .htaccess
-rw-r----- 1 http http 0 Sep 27 17:43 index.html
-rw-r----- 1 http http 428K Nov 7 15:23 nextcloud.log
-rw-r----- 1 http http 0 Sep 27 17:43 .ocdata
[root@lin-virt02 nextcloud]# sudo -u http touch data/test
[root@lin-virt02 nextcloud]# sudo -u http ls -alh data
total 436K
drwxrwxrwx 1 http http 196 Nov 9 04:00 .
drwxr-x--- 16 http http 4.0K Nov 9 03:54 ..
drwxr-x--- 1 http http 76 Sep 30 02:03 admin
drwxr-x--- 1 http http 146 Sep 27 19:19 appdata_ocb0vuuo4fin
drwxr-x--- 1 http http 26 Oct 25 19:14 files_external
-rw-r--r-- 1 http http 324 Sep 27 17:43 .htaccess
-rw-r----- 1 http http 0 Sep 27 17:43 index.html
-rw-r----- 1 http http 428K Nov 7 15:23 nextcloud.log
-rw-r----- 1 http http 0 Sep 27 17:43 .ocdata
-rw-r--r-- 1 http http 0 Nov 9 04:00 test
[root@lin-virt02 nextcloud]# sudo -u http php occ files:scan admin
Your data directory is not writable
Permissions can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/12/go.php?to=admin-dir_permissions.
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /usr/share/webapps/nextcloud/lib/private/Console/Application.php:145
Stack trace:
#0 /usr/share/webapps/nextcloud/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /usr/share/webapps/nextcloud/occ(11): require_once('/usr/share/weba...')
fstab:
synology_url:/volume1/Nextcloud /usr/share/webapps/nextcloud/data nfs rsize=8192,wsize=8192,_netdev,noauto,x-systemd.automount 0 0
Any help would be appreciated!