What are you actually setting the user and group to? The issue is logged here:
http://code.google.com/p/modwsgi/issues/detail?id=288 Looking at the code properly, I am wondering whether there is an inverse logic bug. The code does: if (!strcmp(option, "user")) { if (!*value) return "Invalid user for WSGI daemon process."; user = value; uid = ap_uname2id(user); if (uid == 0) return "WSGI process blocked from running as root."; if (*user == '#') { struct passwd *entry = NULL; if ((entry = getpwuid(uid)) == NULL) return "Couldn't determine user name from uid."; user = entry->pw_name; } } This means that it could only generate that error if setting the user as #nnn, where nnn is an integer. I suspect the code is probably meant to be: if (*user != '#') { struct passwd *entry = NULL; if ((entry = getpwuid(uid)) == NULL) return "Couldn't determine user name from uid."; user = entry->pw_name; } Can you flip the equality test in mod_wsgi code and build from source and see how it goes? Graham On 03/10/2013, at 7:23 PM, [email protected] wrote: > Hi, > > I'm trying to run Apache instance which doesn't have access to /etc/passwd > and /etc/group but mod_wsgi is having problems with this. Even if i set > user/group as uid/gid, i'm getting this error: > > Syntax error on line 3 of /etc/apache2/mods-enabled/wsgi.conf: > Couldn't determine user name from uid. > > Why it needs access to /etc/passwd at all? The whole vanilla Apache doesn't > need this. Thank you. > > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/modwsgi. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/groups/opt_out.
