This allows file and directory permissions work as intended. cmake is now filled with 'sudo' but with sudo timeout this should be fine.
Also print euid and egid if they differ from uid or gid.