I am running Nextcloud AIO on Ubuntu 24.04 and it is working great. I have my data folder mounted on the host at /media/Nextcloud_data/
I need to monitor a specific folder using inotifywait to update time stamps when new files appear. I can do all of that.
But once that is done, I need to run an occ files:scan --path=“/USER/files/Temp”
This is what is failing. I can run it from the CLI as:
sudo docker exec -u www-data -it nextcloud-aio-nextcloud php -f /var/www/html/occ files:scan --path="/{USERNAME}/files/Temp"
and it runs and works just fine.
But as soon as I drop it into a root crontab it no longer works. I tried creating it as a script and running it and I know the script was called by Cron, but it still didn’t update the time stamps.
I am not a Linux expert by any means, but also not a newby. Anyone have ideas how to do this?
If there is another way, I am open to it, basically, my desired results are that anything dropped into the /Temp shared folder will be deleted after 7 days. That is the ultimate goal, but when a user copies a file to the folder, the original date modified is maintained, so most files are already considered over 7 days old. (and then I use the retention flow to delete).