Having this same exact issue. Using knex666's docker image of nextcloud.
Setting permissions to 33:users lets the cron docker image run the script, but then the nextcloud container can't access anything. Switching permissions back to 99 gives nextcloud access, but then the cron docker image doesn't work.