I’m installing Nextcloud from cmd on a headless server. I’ve installed and configured php, mariadb, and the apache webserver. Now I’m trying to use the oss command to install nextcloud itself:
nextcloud]$ sudo -u http php occ maintenance:install --database='mysql' --database-name='nextcloud' --database-user='root' --database-pass='redactedl' --admin-user='admin' --admin-pass='redacted'
It fails with the following error:
PHP Warning: require_once(/home/copperthief/nextcloud/console.php): Failed to open stream: Permission denied in /home/copperthief/nextcloud/occ on line 11
PHP Fatal error: Uncaught Error: Failed opening required '/home/copperthief/nextcloud/console.php' (include_path='.:') in /home/copperthief/nextcloud/occ:11
Stack trace:
#0 {main}
thrown in /home/copperthief/nextcloud/occ on line 11
However, I set the permissions of both console.php itself and the nextcloud folder to 777, so I know for sure they aren’t denying any user permission. (The whole nextcloud folder and everything inside is also owned by the http user.)
I’ve searched both these forums and general php resources, and tried a bunch of stuff, but nothing seems to change. There are people with similar issues but theirs were solved when they set the correct permissions, and I’m still stuck.
Any help would be much appreciated!