educational

CGI, Permissions, and Your Host

One year ago this month, Stephen wrote an article concerning the basics of setting UNIX file permissions in order for a CGI (Common Gateway Interface) script to perform properly. If you are unsure in the least of what I'm talking about, make sure you read his article.

Almost every CGI script you come across, and there are thousands out there, will have a reference in their "readme" or install files pertaining to making a particular file or folder 'world writeable' or chmod 777. From a simplicity standpoint, the 777 permissions basically say that anyone that gains access to the file, can read, write, and execute the script. In today's advanced society, where hacking is commonplace, hosts are becoming very leery or not allowing it at all due to security issues. With web hosts becoming stricter and not allowing world writeable files, this brings most CGI and even some php scripts to a screaming halt; or does it?

Unfortunately for many of us, knowing nothing more than basic FTP uploading and the setting of file permissions for a script is the extent of our knowledge. With many hosts not allowing the 777 permissions, and more doing so every day, it doesn't necessarily mean that our use of scripts is extinct. If and only if your host has set-up the server properly, and we're only talking about UNIX based machines here, a world directory or file does not need to be world writeable. Some coders and even hosts will disagree with this but we personally use a host of this nature, and we use a multitude of scripts.

Web hosts are more advanced today than they were even just a year ago; the days of having to telnet into your account to add an .htaccess file are almost gone, and it won't be too long before having to set your file's permissions will be too. The proliferations of hosts now or already having implemented such programs like web based control panels, phpMyAdmin, and SBOX only verify these facts. As in the case of our host, even the main path to perl doesn't need to be changed; it recognizes the script and automatically determines the path for it; and our sendmail path too.

Our biggest hurdle with these advancements (remember, we're talking about hosts that do not allow 777 permissions) is when we encounter some sort of internal server error, such as 500 errors, 403, and so on. Again, if the host has the knowledge and has set-up the server correctly, we usually find the script to be of the problem in one form or another; which is the case with either type of host. The majority of the time we have not set a variable or path correctly. In some of the more advanced cases where some of us are more adept at modifying a script (hack as they call it) for HTML or other purposes, we may have deleted a variable or added something as simple as a quotation mark. The last option is the fact that the script itself may be the problem and no matter what you or the server does, it just isn't going to work.

In either of the former instances, we need to look at the error logs before thinking the server or your permission is the culprit. I don't want to get into troubleshooting scripts as it is too diverse of a subject but at least you understand what basic steps to take when using a host such as this. Don't get me wrong here, you do need to set permissions, it's the files needing to be set world writeable that we're talking about. What calls for a 777 permission, can be used just fine with 755 permissions. What calls for a 777 ... can be used just fine with 755 permissions.

When you incorporate scripts, you'll need to ask your host or prospective host a few questions. The first and foremost question being "do they allow world writeable files and directories (folders)?" if not, how does the server handle it? (If they allow CGI at all). You truly don't need to know the specifics; you just don't want to be banging your head against a wall because that custom script isn't working. This also includes some php scripts as well; which we recently encountered a problem with. In the end, we found the problem with how it was coded and not a permissions setting (it called for 777 settings). Here is where your selection of scripts is a very important point, if you select a script that has minimal or no support (particularly free ones), then you're asking for trouble and you will possibly wind up spending money for the hosts support personnel to help locate and solve the problem. Which again, can happen with any host whether they allow 777 permissions or not.

While all this sounds troublesome, the true fact is, it makes your scripts much more secure. Making a file world writeable is similar to leaving your image directory completely open for access. With the help of good support technicians, your scripting problems are less than that of what you would encounter normally. It's been drilled into us as users that world writeable permissions are needed, and today it is not so with the proper host. The argument over using programs that "help" or determine how scripts execute are resource intensive and slow servers or even that they're costly, is moot. With properly maintained hardware, good Net connections, and systems that are not overloaded, you will never see a difference in how your site is served.

That's what a good host is supposed to be anyway, one that provides knowledgeable support, uptime, and looks out for its clients security as well as it's own. In choosing a host for a site that incorporates scripts, no matter whether it's only a link submission form or a full bore personals site, all parties security especially sensitive data, should be considered.

Copyright © 2024 Adnet Media. All Rights Reserved. XBIZ is a trademark of Adnet Media.
Reproduction in whole or in part in any form or medium without express written permission is prohibited.

More Articles

profile

'Traffic Captain' Andy Wullmer Braves the High Seas as Spirited Exec

Wullmer networked and hobnobbed, gaining expertise in everything from ecommerce to SEO and traffic, making connections and over time rising through the ranks of several companies to become CEO of the mobile business arm of TrafficPartner.

Alejandro Freixes ·
opinion

To Cloud or Not to Cloud, That Is the Question

Let’s be honest. It just sounds way cooler to say your business is “in the cloud,” right? Buzzwords make everything sound chic and relevant. In fact, someone uninformed might even assume that any hosting that is not in the cloud is inferior. So what’s the truth?

Brad Mitchell ·
opinion

Upcoming Visa Price Changes to Registration, Transaction Fees

Visa is updating its fee structure. Effective April 1, both the card brand’s initial nonrefundable application fee and annual renewal fee will increase from $500 to $950. Visa is also introducing a fee of 10 cents for each settled transaction, and 10 basis points — 0.1% — on the payment volume of certain merchant accounts.

Jonathan Corona ·
opinion

Unpacking the New Digital Services Act

Do you hear the word “regulation” and get nervous? When it comes to the EU’s Digital Services Act (DSA), you shouldn’t worry. If you’re complying with the most up-to-date card brand regulations, you can breathe a sigh of relief.

Cathy Beardsley ·
opinion

The Perils of Relying on ChatGPT for Legal Advice

It surprised me how many people admitted that they had used ChatGPT or similar services either to draft legal documents or to provide legal advice. “Surprised” is probably an understatement of my reaction to learning about this, as “horrified” more accurately describes my emotional response.

Corey D. Silverstein ·
profile

WIA Profile: Holly Randall

If you’re one of the many regular listeners to Holly Randall’s celebrated podcast, you are already familiar with her charming intro spiel: “Hi, I’m Holly Randall and welcome to my podcast, ‘Holly Randall Unfiltered.’ This is the show about sex, the adult industry and the people in it.

Women In Adult ·
trends

What's Hot Now: Leading Content Players on Trending Genres, Monetization Strategies

The juggernaut creator economy hurtles along, fueled by ever-ascendant demand for personality-based authenticity and intimacy — yet any reports of the demise of the traditional paysite are greatly exaggerated.

Alejandro Freixes ·
opinion

An Ethical Approach to Global Tech Staffing

One thing my 24-year career as a technologist working to support the online adult entertainment industry has taught me about is the power of global staffing. Without a doubt, I have achieved significantly more business success as a direct result of hiring abroad.

Brad Mitchell ·
opinion

Finding the Right Payment Partner

Whenever I am talking with businesses that are just getting started, one particular question comes up a lot: “How do I get a merchant account?” It’s a simple question, but it has a complicated answer.

Jonathan Corona ·
opinion

The Taxman Cometh for Every Business

February may be the month of romance, but it is also a time when we need to think about something that inspires very little love: taxes. April is not far away, and the taxman is always waiting. This year, federal and most state income taxes are due Monday, April 15.

Cathy Beardsley ·
Show More