SID-00524: Configure --> CGI Setup --> Claims CGI user userid = root
| Status: |
Answered |
TWiki version: |
4.3.2 |
Perl version: |
5.10.1 |
| Category: |
CategoryInstallation |
Server OS: |
IBM AIX 5.3.0.0 |
Last update: |
16 years ago |
Hi, I'm having a similar problem as outlined here:
UseEffectiveUIDInTestenv
I am in the middle of installing it on an IBM AIX.
However, when I run the Configure script under CGI Setup it claims I am running as
root:
From the configure setup under CGI user:
userid =
root groups = www,www, twikipub ...
In My httpd.conf file I have:
User www
Group www
In /twiki/bin file I have:
-r-xr-xr-x 1 www www 24084 Sep 2 09:29
configure
Yet if I run:
my $usr = lc( getlogin || getpwuid($<) );
my $eusr = lc( getpwuid($>) );
... The results:
usr:
root
eusr:
www
running the following in a script in the /bin directory (with the same privs as configure)
warn "I am ", `whoami`, " ", `id`, "";
Results:
I am
www uid=203(
www) gid=201(
www) groups=205(
twikipub)
Why is configure listing this as root, are they grabbing the real UID instead of the effective UID of the httpd process configure now?
Thanks
--
GregNeugebauer - 2009-09-10
Discussion and Answer
The configure script uses this code:
$WebServer_uid = getlogin() || getpwuid($>) || '';. Neither
getlogin() nor
getpwuid() are used by TWiki, the CGI
$query->remote_user() is used by the TWiki scripts if apache login is used.
Possibly related:
FreeBSDInstallProblem
--
PeterThoeny - 2009-09-10
Thanks for the response Peter.
So the bottom line is ebServer_uid = getlogin() || getpwuid($>) || '';
is only used in the configure script.
I searched the TWiki 4.3.2 code and could not see it in use anywhere else to confirm this.
Am I seeing the root because of my particular set up?
If not, may I suggest then not to use this in the configure script, but instead to use grab the effective ID: lc( getpwuid($>) );
--
GregNeugebauer - 2009-09-11
Good point. I am not sure why configure is implemented that way. I encourage you to help out and get involved with the community.
ReadmeFirst has more.
--
PeterThoeny - 2009-09-12
I'm setting this to answered, since it is clear that TWiki uses the effective ID, except for informational purposes in the configure script.
--
GregNeugebauer - 2009-09-14
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.