Apache suEXEC Support

CGI Scripting Notes We use the suEXEC wrapper that comes with Apache. This "wrapper" is a setuid-root script that is executed by the apache server, which will execute your CGI script. suEXEC does various security checks before executing your CGI script. If any of these checks fail, you're script won't be executed, and an error will be returned. The use of suexec is a good and wonderful thing. To take full advantage of it, file permissions can be optimized, replacing the more general defaults suggested in the install doc. For data files that normally require "766" permissions, use "744". Data folders that require "777" should use "755". When setting permissions for cgi scripts, the most common permissions setting is 755. 755 allows the owner "Read and Write" access, while allowing the Group and Public "Read and Execute" permissions. So what are we actually saying? In short, when users access your cgi script, the server has been instructed to grant them permissions to "Read and Execute" it. Sound scary? It's not actually & Remember that a script is a program that must be processed by the server. As long as the script is written properly, you can safely allow users to execute it, and thus providing the desired results. For example, if they wanted to post a message to your wwwboard discussion forum, then they would need these permissions to execute wwwboard.pl, which would write their new message to an html file, which is displayed on the main forum. The new message would reside in a directory on your site so other users could view it. Most cgi, perl and other scripts you'll be installing come complete with instructions telling you which permissions you'll need to set them to. WARNING! Setting permissions on files is a relatively simple task, however MAKE SURE you fully understand what it is you're allowing the public to do with your files. For example, some less experienced users often make the fatal mistake of simply setting ALL of their files to 777. While 777 will automatically allow executing privileges, it also allows full "READ, WRITE, and EXECUTION ability to the entire world!!!! suEXEC will now take care of this problem! This is how web sites get hacked! While most visitors have good intentions, all it takes is one person whom snoops about your files seeking an "Open Back Door." This could result is them gaining full access to your directories, which means they can do anything from deleting your entire site, to defacing it with obscenities. New to cgi? Here is a page with questions and answers to numerous questions evolving around the inns and outs of using cgi within your scripts: http://www.w3.org/Security/Faq/www-security-faq.html
  • 137 Users Found This Useful
Was this answer helpful?

Related Articles

Help with Mysql

One common problem I have noticed is that people don't realise that all cPanel databases are...

Help with Myphpadmin

Everyone has there own way of working with phpMyAdmin, I find my way easy so I'll explain my way...

Do you support PHP?

Yes, our servers supports PHP scripts. File extension of PHP scripts should be ".php".

Powered by WHMCompleteSolution