Perl cgi's now need -w or -U to run

jcarey

Registered
Feb 22, 2004
2
0
151
Not sure what I have done - but suddenly all my perl scripts need me to add -U or -w on the shebang line to run (or I get a500 internal server error) - anyone have a clue (I had auto update on - have since changed to manual - but I doubt any std update would have done it ?)

suexec log shows:

info: (target/actual) uid: (userid/userid) gid: (userid/userid) cmd: perldiver.cgi
[2005-07-27 16:01:47]: error: target uid/gid (32005/505) mismatch with directory (32005/505) or program (99/99) or trusted user (0/10)

My script is chmod 0755, userid and group are userid/userid (real ones) and both the group and userid are defined in /etc/group and /etc/passwd respectively. and cgi is in /home/userid/public_html/cgi-bin

I may experiment with turning suexec off in apache - if I can figure out how to do that :) (this is a test server so no impact at moment)

Jim
 
Last edited:

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Is /home/userid/public_html/cgi-bin owned by userid:userid and chmod 755? Is /home/userid/public_html owned by userid:nobody and chmod 750?
 

jcarey

Registered
Feb 22, 2004
2
0
151
Yes - true in both cases - I noticed that the www->public_html was root.root - changed that as well to userid.nobody to no effect

strange
Jim
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
That is odd. I'm trying to wrack my brains as I have seen that before (with my perl coder hat on) but cannot rmember the cause.

If you hit a dead end, feel free to PM me.
 

iweblite

Registered
Aug 25, 2006
2
0
151
chirpy said:
Is /home/userid/public_html/cgi-bin owned by userid:userid and chmod 755? Is /home/userid/public_html owned by userid:nobody and chmod 750?

Hello,

how may i do that? in SSH? WHM? can tell me step by step? really sorry im fresh newbies..
 

WebScHoLaR

Well-Known Member
Dec 14, 2005
508
3
168
Planet Earth
You need to connect to the server via SSH. If you are on a Windows platform then you can use SSH client like Putty to connect to the server and then check the permissions and ownerships of the directories.