#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <grp.h>



int main()
{
 
struct group *apache_group;
 
 
 apache_group = getgrgid(getgid());
 
 printf("Content-type: text/html\n\n");
 
 puts("<html><head><title>Apache Group Check</title></head><body>");
 printf("Apache is running as group: <b>%s</b>\n<p>", apache_group->gr_name );
 
 puts("To properly set the permissions for  your Manhattan installation<br>");
 puts("<ol><li>cd to the 'src' directory of your Manhattan installation</li>");
 puts("<li>Become 'root' (or use sudo to execute the next command as 'root')</li>");
 printf("<li>Type the command:<p><b>./set_dirs %s</b><p>\n</li></ol>", apache_group->gr_name); 
 puts("</body></html>");
 return 0;
}



