orbhost

WelcomeHostingNewsSupportHow Do IContact Us

HomeDesignLinksSearchSite MapGlossary


Topics

Easy step by step permission settings


Proper permission settings depend on the type of file:

HTML files
CGI scripts
CGI script data files
Media files, such as GIF, JPEG, sounds...


HTML files permission settings

All that's needed for HTML files, is the read permission for the web server, which is "httpd" and is in the "others" triplet of permission. Of course you must retain your own full access to your own files, so you should give yourself read/write/execute (rwx) and read/execute for your group (which should be yourself, for better security).

Therefore, the 3 digits for the chmod command should be 754 and the command line would be:

chmod 754 filename.html

That's assuming that you are "located" in the folder containing the file you want to change the settings on. You must know the basics of "navigating" around your folders to place yourself in the right location. Or you can just use this 3 digit setting with your FTP client when uploading your files.

For users with a bit of experience with telnet, you should consider using the ACLs for more control and security.

Up'n'Down Pad


CGI scripts permission settings

CGI scripts written in Perl need both read and execute permissions to run properly, while "compiled" scripts may only need execute permission. A "compiled" script can be written in C for example, which is not an "interpreted" language like Perl or Tcl. The result from a "compiled" program is a "binary" file, which is directly executable by the machine is was compiled for. A Perl script should be set to:

chmod 755 filename.pl

to run properly (replace filename by the real script's filename).

A compiled script, written in C or any other compiled language, can be set to:

chmod 751 filename.cgi

The filename extensions are by convention .pl for Perl scripts, and .cgi for other types of scripts. However, naming a Perl script with the .cgi extension will work fine.

For reasons of enhanced security, users with more experience should try using ACLs, as mentionned above.

Up'n'Down Pad


Data files associated with CGI scripts

Many CGI scripts have their own associated data files, some are just read only, such as configuration files, and many will need write permission to allow the scripts to modiffy them when they run. The read only data and other config files can be set the same as all other HTML files, see this section above. All other data files requiring write permission, can be set up with:

chmod 756 datafilename

(as usual, change datafilename by the real file's name)

Keep in mind that giving such write permission to your files opens the door to others to make changes, delete or overwrite the files. This is however a necessary evil, as the scripts would not run otherwise. There is now way to prevent this problem totally, but there is a way to reduce such risks with the use of ACLs, which can control who has access to those files with better precision.

Up'n'Down Pad


Miscellaneous media files associated with HTML pages

HTML pages need other files to be fully functional, such as pictures, movies and sounds. Pictures can be gif, jpeg or png. Movies and sounds have many format, such as mov for movie, wav for "windows" sound files, and many others. Generally, these files only need read permission and should be set up the same as any other HTML files, see the section above.

The Java applets and their files will usually only need read permission and can also be set up as HTML files. However, sometimes, they may require write permission to their associated files if they save data, for database or other functions, in that case, these data files should get write as well as read permissions and set up like the CGI scripts' data files in the section above.

 

Glossary

Telnet, Unix, FTP, CGI, cgi-bin, Server, Binary, Octal, HTTP


 

 

 

 

 

orbhost's Support


 Check the How Do I page for answers to many of the most common basic questions

 Hit Counter
 FTP login
 Telnet login
 Basic UNIX
 Basic CGI
 permissions
 E-mail & Mailboxes
 Web design
Tips and tools
 Search Engines
Hints & strategies
 Shopping cart
Also check the external links about Minivend
 Database
Also check the external links about MySQL
 

External Links

 MySQL site
Relational database
 Minivend site
Shopping cart
 wwwcount
Graphical hit counter
 Perl Links
 Search engines
Info & resources
 

In case of emergency

E-mail the tech support
or you can also try contacting the system administrator directly on ICQ at #18164451