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.

Other files besides perl scripts in the cgi-bin

Discussion in 'General Discussion' started by Sash, Apr 18, 2003.

  1. Sash

    Sash Well-Known Member

    Joined:
    Feb 18, 2003
    Messages:
    252
    Likes Received:
    0
    Trophy Points:
    16
    Does anyone know how to run files other than perl scripts inside the cgi-bin? It seems any file accessed from inside the cgi-bin is being executed as if it was a perl script. That causes problems for images and HTML files which don't need to be executed.

    Thanks
    Mike
     
  2. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    The 'cgi-bin' is a protected, specific directory, designed only to run 'cgi - pl' scripts and associated info files; i.e., *.dat, *.txt, *.inc, etc. It was never designed for anything other than that, so; html, php, images, other type files, will not work.

    If a 'cgi - pl' script calls or results to, an html file or needed images, they need to be accessed from 'document root' and the path = /images/image.gif or path = /file.html. This tells the script to 'jump out' of the 'cgi-bin' and start looking for the file from the beginning of 'document root' -- which is also where the Home Page for the site is, in case you were wondering. :)
     
  3. bmcpanel

    bmcpanel Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    546
    Likes Received:
    0
    Trophy Points:
    16
    I believe this has to do with SUEXEC operating on the server. I may be wrong. If you turn off SUEXEC, I think that you will be able to put other NON-CGI files in the cgi-bin.

    Again, I am not sure about SUEXEC causing this, but it seems like I first noticed this same cgi-bin behavior after installing SUEXEC last year.
     
  4. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    suexec is related to how 'cgi-bin' works, but we all know (or should) that running a Server without suexec, is like a day without Sunshine -- the security holes would be so wide & deep, it would be a dark day indeed. :)
     
  5. Sash

    Sash Well-Known Member

    Joined:
    Feb 18, 2003
    Messages:
    252
    Likes Received:
    0
    Trophy Points:
    16
    Thats kind of what I thought, thanks everyone.

    Mike
     
Loading...

Share This Page