CHMOD - Setting File Permissions
Printable PDF version HERE
This tutorial is designed to
show you how to set file permissions with your ftp client. WS_FTP LE
and CuteFTP are covered here.
If you're using SmartFTP, you can find
a tutorial on setting file permissions on their site -
http://www.smartftp.com/support/howto/
- Look toward the bottom of the page under the heading "Miscellaneous" for CHMOD and
click the "View" link.
Overview:
The most common reason to set permission for a file or folder is when you're using
a cgi script on your site. A cgi script and its supporting files/folders normally require specific
permissions in order for them to do their job.
Unix classifies users by individual, group, and world. Permission to access files
and directories is based on the category an individual user falls into, relative to the owner
and group of the file or directory being accessed. The term for configuring
Unix file security is "setting file permissions".
Read - allows the file or folder to be read
Write - allows the file or folder to be written to.
Execute - allows executing of the file or folder.
Owner - the person who owns the account that the file or folder resides in.
Group - any user residing in the same group
Other - any other user including Anonymous
Most cgi scripts will run properly when set to 755 as shown in this tutorial so its
best to try that first even if the script information says to set it to 777. Many web hosts
do not allow users to set 777 permissions due to security issues.
Some scripts will run with a lower permission. Be sure to check the documentation that
came with the script for the details that you need. Your instructor is also available to help you
if you're taking a class here at LVS.
WS_FTP
- this may work with other FTP clients but I won't guarantee it, and the screen
caps will likely not look the same
- Upload the cgi or pl document to your cgi-bin in ASCII mode.

Note: if you use Auto please be sure that you've added
.pl and .cgi to the Extensions tab under Options to ensure that WS_FTP knows to
upload those files with ASCII mode.
- Right click on the file name on the remote side of the FTP program.
- Choose chmod from the pop-up menu.
- Put a check mark in each of the following boxes:
- OWNER: read, write and execute
- GROUP: read and execute
- OTHER: read and execute
- Click the OK button.
- Look in the lower left corner of WS_FTP. You should see a success message
something like this:
Cute FTP
- Upload the cgi or pl document to your cgi-bin in ASCII mode.

Note: if you use Auto please be sure that you've added
.pl and .cgi to the Text-files extension area by going FTP > Settings >
Text-file extensions.

If you don't see cgi and pl there, type them in and click the Add button.
- Highlight the file you want to set permissions for
- Go Commands > Advanced Commands > Change File Attributes
- When the dialogue box pops up, type 755 in the box labeled
"Manual"
- Click the OK button
Printable PDF version HERE
|