The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by jcarey, Jul 27, 2005.

  1. jcarey

    jcarey Registered

    Joined:
    Feb 22, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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
     
    #1 jcarey, Jul 27, 2005
    Last edited: Jul 27, 2005
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    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?
     
  3. jcarey

    jcarey Registered

    Joined:
    Feb 22, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    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.
     
  5. iweblite

    iweblite Registered

    Joined:
    Aug 25, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1

    Hello,

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

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    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.
     
Loading...

Share This Page