When adding
new files such as CGI, Perl, etc. it is necessary
to set specific permissions for the script to work.
The UNIX
directory and file structure has a system of permissions.
You have permission to read a file, you have permission
to write to a file, and finally, you have permission
to execute a file. However, you are not always you.
Unix splits identities into three categories. The
first is you, the owner of the file. The second is
the group you belong to. And third, others is the
world, basically anyone who comes to your website.
To change
permissions you must issue a "change mode command",
or more commonly referred to as the UNIX command "chmod".
The documentation for your file or script will usually
come with the proper permissions you need to set for
your program to work. To set permissions, there are
basically 2 methods UNIX recognizes.
With FTP
(and Telnet) your file properties are shown as -rwxr-xr-x.
The first
space designates if this is a directory by the letter
"d".
The next
three characters designate the permissions for the
"owner", r = read, w = write, and x = execute if the
permission is set to "on" and "-" is the permission
is set to off.
Permissions
for the "group" and "world" (other) are designated
by characters 5-7 and 8-10 respectively.
The second
method we are calling the alpha method because permissions
are set, by way of a telnet session, using alpha
characters. You simply specify with the group or
groups whose settings you want to change ("u" represents
"user" or you, "g" represents "group", "o" represents
other or world and "a" represents "all") and all
the settings you want to change ("r" for read access,
"w" for write access, and "x" for execute access).
To set your file world-writable, you would type
"chmod o+w ". To set it executable to everyone,
you would use "chmod a+x ". The plus sign indicates
you're adding permissions. You can use a minus sign
to remove permissions.
top
of page
|