Nextcloud occ command not working

My docker nextcloud instance is working perfectly but recently i was about to add data to nextloud via the sudo -u abc occ files:scan --all command and it showed me an error:

abc is not in the sudoers file.
This incident has been reported to the administrator.

Then i found a GitHub issue which addresses a similar problem. There, the following is mentioned:

Running with sudo -u abc from the path, works (…)

So i should run occ with its direct path in order resolve my specific error. The problem is, that my occ path seems not to be the same. The directory mentioned in the issue ( ./config/www/nextcloud/occ) doesn’t work in my case.

straight from the container readme

Note: occ should be run without prepending with sudo -u abc php or sudo -u www-data php ie; docker exec -it nextcloud occ maintenance:mode --off

Thank you for your reply. I tried this before even fiddling around inside the container shell. Running sudo docker exec -it nextcloud occ maintenance:mode --off returns

Console has to be executed with the user that owns the file config/config.php
Current user id: 1003
Owner id of config.php: 0
Try adding 'sudo -u #0' to the beginning of the command (without the single quotes)
If running with 'docker exec' try adding the option '-u 0' to the docker command (without the single quotes)

So i tried with -u 0 (sudo docker exec -it -u 0 nextcloud occ maintenance:mode --off) but it delivers the same output.

this implies you have some permissions issues, i would suggest joining us on discord for further help