Hello,
new to nextcloud docker. I used a dietpi nextcloud before. After installing multipletimes and going in circles i decided for a default docker installation from the nexcloud github. I choosed the insecure, postgress fpm. no dockfile
i changed the minimun things and it was running till log in. then log in started to loop.
it is a problem with permissions. i try to change the ownership of the containers but didnt work. now i can not even access the webservice. because nginx says forbidden.
i have bin running in circles with this for days. installing and reinstalling diferent dockers or trzing to fix this issue with the premisions
i am mounting a external hd as default data directory. it is ext4. using raspian lite 64, raspberrypi 4 4gb
i guess its a commom problem or a very stupid thing i am not able to see, but i can not find a solution.
running
docker exec -u 33 -it next_app_1 php /var/www/html/occ files:scan --all
gives me now
{“reqId”:“Yo2P1GrbHpyqXvsjVmAE”,“level”:3,“time”:“2025-05-04T23:30:01+00:00”,“remoteAddr”:“”,“user”:false,“app”:“PHP”,“method”:“”,“url”:“–”,“message”:“fopen(/var/www/html/data/data_dir_writability_test_6817f8792ba2a.tmp): Failed to open stream: Permission denied at /var/www/html/lib/private/legacy/OC_Util.php#446”,“userAgent”:“–”,“version”:“31.0.4.1”,“data”:{“app”:“PHP”}}
Your data directory is invalid.
Ensure there is a file called “.ncdata” in the root of the data directory. It should have the content: “# Nextcloud data directory”
Your data directory is not writable.
Permissions can usually be fixed by giving the web server write access to the root directory. See Introduction — Nextcloud latest Administration Manual latest documentation.
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/html/lib/private/Console/Application.php:143
Stack trace:
#0 /var/www/html/console.php(81): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/html/occ(33): require_once(‘/var/www/html/c…’)
#2 {main}{“reqId”:“Yo2P1GrbHpyqXvsjVmAE”,“level”:3,“time”:“2025-05-04T23:30:01+00:00”,“remoteAddr”:“”,“user”:false,“app”:“PHP”,“method”:“”,“url”:“–”,“message”:“fopen(/var/www/html/data/nextcloud.log): Failed to open stream: Permission denied at /var/www/html/lib/private/Log/File.php#53”,“userAgent”:“–”,“version”:“31.0.4.1”,“data”:{“app”:“PHP”}}
i would really apreciate a hint in the good direction.