One of the more confusing things for the aspiring web publisher is file permissions. It is important to understand the differences, because things could not work properly otherwise.
The best way to explain this is with an example, so lets look at our /frames directory and the permissions there. To see the permissions you must type ls -ls.
-rw-rw-r-- 1 bcpub users 526 Nov 18 21:51 submit.html-rwxrwxrwx 1 bcpub users 1155 Nov 18 03:08 test1.cgi*
-permissions---owner-group-------last modified-filename
-rwx rwx rwx = -rwxrwxrwx
owner group public
Each file has three seperate permission areas that you can assign. Each area also three options of security. The three areas are owner, group, and public and the three options for each area are r-read, w-write, and x-execute. The listing in the directory also follows the owner,group,public scheme. So -rwxrwxrwx means that anyone can read, write, or execute the file but -rwxr-xr-x means that only the owner can do all three, the group and public can only read or execute the file.
With that all clear, you have to know how to assign those security options to the file. For this you need to understand the chmod command. The chmod command stands for change mode and has the following sytax
chmod area +/- permission file.extThe options for the area are
u = the file's user (or owner)
g = the file's group
o = others (or public)
a = the user, the group, and others.
The +/- stands for
+ = assign this permission
- = take away this permission
And the rwx is
r = read access
w = write access
x = executable access
Well on to some examples.
chmod a+x = let everyone execute the file
chmod go-w = the group and public have no permission to write to the file
chmod g+rw = people in the group can read and write to the file