1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

CGI Scripts only run in /cgi-bin/ subfolder

Discussion in 'Plesk for Linux - 8.x and Older' started by ryanz, Mar 7, 2007.

  1. ryanz

    ryanz Basic Pleskian

    24
    73%
    Joined:
    Nov 23, 2002
    Messages:
    91
    Likes Received:
    0
    Hi,

    We also have this problem where .cgi and .pl scripts only run in a /cgi-bin/subfolder and not in the root of the domains cgi-bin.

    The permissions seem fine but when the file is copied from the cgi-bin root directly to the subdirectory it works perfectly.

    Also tried to copy psa-suexec to /usr/sbin/suexec but no luck.

    The domain error log shows this:
    Premature end of script headers: filename.cgi

    The suexec log shows this:
    [2007-03-07 21:39:53]: uid: (10001/ftpuser) gid: (10001/10001) cmd: filename.cgi
    [2007-03-07 21:39:53]: target uid/gid (10001/10001) mismatch with directory (10001/2523) or program (10001/10001)

    I see some other users on this forum have the same problem.
     
  2. ryanz

    ryanz Basic Pleskian

    24
    73%
    Joined:
    Nov 23, 2002
    Messages:
    91
    Likes Received:
    0
    Just a follow up on the above post.

    The normal group permissions for the cgi-bin directory are:

    drwxr-x--- ftpuser:psaserv cgi-bin

    But I notice that the .cgi and .pl files will run from the cgi-bin root if you change the cgi-bin folder permissions to:

    drwxr-x--- ftpuser:psacln cgi-bin

    This means that none of our domains will work as it is and that we need to change the permissions on all of them.

    Does anyone have feedback or comments on this to have suexec and cgi-bin work with ftpuser:psaserv
     
  3. blank_page

    blank_page Regular Pleskian

    24
    53%
    Joined:
    Dec 17, 2006
    Messages:
    229
    Likes Received:
    0
    Hello,

    You should try the following:

    search for psa-suexec

    replace your suexec with that.

    Backup the suexec first:)
     
  4. akumarjain

    akumarjain Guest

    0
     
Loading...