Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    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
     
    #1 jcarey, Jul 27, 2005
    Last edited: Jul 27, 2005
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jcarey

    jcarey Registered

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

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. iweblite

    iweblite Registered

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

    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:
    3
    Trophy Points:
    168
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice