PHP – Get Apache User and Group This is a simple one! $user = posix_getpwuid(getmyuid()); $group = posix_getgrgid(getmygid()); PHP