UNSW   Faculty of Engineering PRINT VERSION SITE MAP  
cse | School of Computer Science and Engineering (CRICOS Provider No. 00098G)
    #About CSE     #Undergraduate Study     #Postgraduate Study     #Timetables & Courses     #Research & Publications     #People & Work Units     #Help & Resources     #News & Events     #High School Portal

Last updated 19.02.08


Permissions

Access to your files, for yourself and for other users, is controlled by setting file access permissions on files and directories. The UNIX file system allows file access permissions to be set for the following categories of users:

  • The owner
  • All users belonging to the same group as the file's group owner. (All users belong to one or more groups. The group is important for security and accounting reasons. To find out which groups you belong to try the command groups.)
  • All other users

These categories of access permissions can be set to either allow or deny read, write, and execute access to your files.

By default, when you create any files, you, as the owner, are granted the relevant read, write and execute permissions. Other users are given no access permissions to your files.

You can have System Support set up a group directory for group assignment purposes if necessary. Email ss to have this arranged.

You will recall from the previous section that the -l option of the ls command displays the access permissions to a file for all three categories listed above. So, what does it all mean? This is best answered with an example:

    % ls -al
    total 24
    drwx------   3 cathy        4096 Jan 21 16:58 .
    drwx------  32 cathy        4096 Jan 21 16:39 ..
    -rw-------   1 cathy         120 Jan 21 16:43 junk.txt
    drwx------   2 cathy        4096 Jan 21 16:58 letters
    -rw-------   1 cathy         176 Jan 21 16:45 myfile.txt
    -rw-------   1 cathy           0 Jan 21 16:45 session1.txt
    -rw-------   1 cathy          75 Jan 21 16:40 stuff.txt

Permissions are always listed in the order read, write, execute.

From the above example, you can see that letters is a directory, and that the owner has read, write and execute permissions. The owner of the files in this directory, has read and write permissions to the files but group and other permissions are denied.

Loc Van Huynh 2007-03-15
Top Of Page

 ###
Site maintained by webmistress@cse.unsw.edu.au
Please read the UNSW Copyright & Disclaimer Statement