I have left this running however the new files which I manually added to my e drive are not showing up. When I run the command service cron status it states that cron service is running but it doesn’t appear to be working. Any idea how to resolve this?
Thank you both for your help and sorry if my reply is later then expected.
I am very lost. I am not much of a linux user and new to compose files and of course NC so I am learning things as I go along. I have made adjustments to the docker compose file see below
Hopefully this is ok. I have rerun the container and it all looks to be working. However when I look into nextcloud-cron every 5 minutes I see the following error in the logs
Could not open input file: /var/www/html/cron.php
I have tried navigating to the file to see if it is there by
docker exec -it nextcloud-app bash
this takes me to /var/www/html# and when I tap ls I can see the cron.php file. Any idea why docker desktop is returning this error and how I can get it resolved?
as you are troubleshooting the cron container I would examine from there. Although you use same volume mounts and the should be no difference I would still use docker exec -it nextcloud-cron ls -al /var/www/html/cron.php… the file should be there and has 640 permissions in my system (owner by default 33:33 or www-data:www-data).
it’s not related to the problem but I would make cron depend on nextcloud rather on db
I ran the command exec -it nextcloud-cron ls -al /var/www/html/cron.php
and it returned no file or directory existed. Going one folder back I can see the following
docker exec -it nextcloud-cron ls -al /var/www/html/
total 8
drwxrwxrwt 5 www-data root 4096 Aug 31 16:33 .
drwxrwxr-x 1 www-data root 4096 Aug 30 23:31 …
drwxrwxrwx 1 www-data www-data 4096 Aug 26 18:52 config
drwxrwxrwx 1 www-data www-data 4096 Aug 26 16:53 custom_apps
drwxrwx— 1 www-data www-data 4096 Aug 27 13:15 data
Any idea how to get add this again? Not sure if I can obtain the file from somewhere - download it maybe?
I tried this but now when I navigate to my localhost it throws a server error. I will try and delete everything and start again. I noticed in docker desktop the SQL image is 9 months old so maybe it is looking at stale information.
The above is the problem. The real issue is that your volume configuration isn’t appropriate on your app container. So it also won’t work for your cron container.
Also, having everything in separate volumes like that is fine, but is is more complicated. It doesn’t appear you’re placing them in separate places so you’re likely making things unnecessarily complicated for yourself, without any apparent benefit for your use case.
2024-09-05 15:20:00 crond: USER root pid 806 cmd php /var/www/html/occ files:scan --path=“/var/www/html/config”
2024-09-05 15:20:00 crond: USER www-data pid 807 cmd php -f /var/www/html/cron.php
2024-09-05 15:20:02 Console has to be executed with the user that owns the file config/config.php
2024-09-05 15:20:02 Current user id: 0
2024-09-05 15:20:02 Owner id of config.php: 33
2024-09-05 15:20:02 Try adding ‘sudo -u #33’ to the beginning of the command (without the single quotes)
2024-09-05 15:20:02 If running with ‘docker exec’ try adding the option ‘-u 33’ to the docker command (without the single quotes)