If you type "ls -l" you will see the long listing of the files in a directory.
-rwxr-xr-- 1 tfsmiles s 3072 Apr 5 13:38 fileThe leading - represents the file type, in this case a normal file, other possibilities are discussed below. The first field of the list is the access permissions field, and can be broken into three parts. This file is rwx(readable, writable, and executable) by the owner "tfsmiles", r-x(readable and executable) by the group "s", and r--(readable) by everyone else.
drwx-----x 17 tfsmiles s 3072 Apr 5 13:38 /n/www/tfsmilesThis directory, as denoted by the "d", is rwx(readable, writable, and executable) by the owner "tfsmiles", ---(inaccessible) by the group "s", and --x(executable) by everyone else. In order to enter a directory or access it's contents, you must have execute permissions on that directory.
lrwxrwxrwx 1 tfsmiles s 3072 Apr 5 13:38 public_html -> /n/www/tfsmilesFiles with an "l" in the permission field are links or aliases to other files. Links are not really files themselves, so their permissions are completely ignored.
$ chmod u+rx fileIn the above example, the command adds rx(read and execute) permissions to the u(ser), or owner, of the file. Note that the writability for the user remains unchanged because it was not specified.
$ chmod g-wx fileHere, wx(write and execute) permissions are subtracted from the file's g(roup). Note that the readability for the group remains unchanged since it was not specified.
$ chmod o=r fileFinally, r(ead) permissions for the file are assigned to o(thers). The use of the = causes the existing permissions to be replaced with the given permissions. Note that this may take away any read, write, or execute permissions if they existed for the user or group, and may remove any write or execute permissions for others.
For more information on file permissions, see the chmod(1) man page.
$Id: permsnote.html,v 1.3 2000/03/31 19:44:43 edog Exp $