I'm running a PHP process from root which calls posix_setuid(1500); and then tries to open a file output.logThe ls -l output.log shows this output:-rwxrwxr-x 1 www-data www-data 2294376 Mar 19 12:05 output.logThe id command from my user account(jonny) shows this output:uid=1500(jonny) gid=1500(jonny)  groups=1500(jonny),27(sudo),33(www-data)Even after changing the uid to jonny why is PHP process not able to write to output.log file?
Not able to write a file when in the same group using PHP posix_setuid()
php;setuid