File directory permissions and ownershipIn UNIX, the system works with an owner, group, and everyone else. The owner is the designated user that creates the files and is allowed to change permissions with commands. The owner also can remove, modify, and create files at will. Permissions are advantages users have over a fileÃÂs contents and what can be viewed. This file viewing is controlled by commands. UNIX uses three commands for permissions, ÃÂrwxÃÂ (R) reading the file, (W) modifying the fileÃÂs content, and (X) executing, running a file.
The three letters that allow permission mean: 'owner', 'group' and 'all' and this is tripled for each, ending in nine. This can be on ÃÂsetÃÂ or ÃÂnot setÃÂ denoted by a dash (-).
An example of a written permission is: ÃÂrwxr-xr-x.ÃÂ(http://www.perlfect.com/articles/chmod.shtml)What the above command represents is equal permission for the owner as the first portion denotes, but as the second and third portion has the two dashes, the group and everyone else do not have access to the file, only to read and execute it.
To view permissions, the is: $ ls ÃÂlMore examples:drwx------ 2 richard staff 2048 Jan 2 1997 privatedrwxrws--- 2 richard staff 2048 Jan 2 1997 admin-rw-rw---- 2 richard staff 12040 Aug 20 1996 admin/userinfodrwxr-xr-x 3 richard user 2048 May 13 09:27 public(http://www.dartmouth.edu/~rc/help/faq/permissions.html )The first row of permission ÃÂdrwxÃÂ is a directory, because of the ÃÂdÃÂ and allows access to the owner only. The second row ÃÂdrwxrwsÃÂ is also a directory and the group is allowed to access this file because the ÃÂsÃÂ at the end denoting a group setting. The third row, ÃÂ-rw-rwÃÂ there are limitations on the group and everyone else. Only read and execute are allowed according to the owner. Finally, on the fourth row, ÃÂdrwxr-xr-xÃÂ the owner has full access, but the group is allowed...