Coolify permission issue

If coolify gives and error as:

sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

Then immediate fix can be:

su -
chown root:root /etc/sudo.conf
chown root:root /etc/sudoers.d
pkexec chown root:root /etc/sudoers /etc/sudoers.d -R