I still can’t get past the Initial Setup/Configuration page for NextCloud. Now it keeps giving me a “Can’t create or write into the data directory opt/nextcloud/data” Error message.
At least I’m making progress.
The nextcloud/data/nextcloud.log gives me the following three messages:
“Could not detect any host in http:///data/htaccesstest.txt”
“mkdir(): No such file or directory at /var/www/html/nextcloud/lib/private/Setup.php#312”
“Could not find resource js/setup.js to load”
I’ve checked the php.ini file for “open_basedir = none”. It wasn’t there, I added it. It made no difference.
I’ve checked my mySQL nextcloud database oc_storages table for correctly pointing at /opt/nextcloud/data
/opt/nextcloud and /opt/nextcloud/data belong to www-data user and group with 755 permissions (777 permissions made no difference… and 755 permissions mirror the default NextCloud install).
Any suggestions where to look next?
Installation is NextCloud on Ubuntu 20.04 Server (Headless) using NGINX, PHP 7.4, MariaDB, SSH, as subdomain.domain.dom (site works, until NextCloud installed… then it fails to configure/setup).
I think the problem exists in my nginx configuration for subdomain.domain.dom
# Make a regex exception for `/.well-known` so that clients can still
# access it despite the existence of the regex rule
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
# for `/.well-known`.
location ^~ /.well-known {
# The following 6 rules are borrowed from `.htaccess`
rewrite ^/\.well-known/host-meta\.json /public.php?service=host-meta-json last;
rewrite ^/\.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/\.well-known/webfinger /public.php?service=webfinger last;
rewrite ^/\.well-known/nodeinfo /public.php?service=nodeinfo last;
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
try_files $uri $uri/ =404;
}
After doing some more reading (research)… I think that perhaps NGINX isn’t being allowed permission… or more specifically, isn’t being instructed to write into the /opt/nextcloud/data/ directory.
But I’m not sure how to add that.
Am I correct, or missing the mark here… and if someone can guide my config, until I have a better understanding of how to code that specific allowance, I would greatly appreciate it. Thanks!