You cannot fix this from the running system. Any command you’ll need to run will have to be run as root which can’t be logged into on raspbian.
You’ll have to mount this SD card to another Linux machine and change the file permissions and ownership on the sudo files.
However, these file permissions don’t just change themselves and if you don’t know what caused this to happen there is no reason to believe that this is the only problem that has been introduced. So you can spend hours and hours hunting down each and every strange behavior that crops up or you can cut your losses and restore from backup or, if you don’t have a backup rebuild. You should be able to copy your config files but you won’t be able to run openhab-cli backup to do so.
I totally agree with you. That’s why I have already started to completely set up my system again.
I’ve a backup and you are right I’m be able to copy the config files too.