home *** CD-ROM | disk | FTP | other *** search
/ norge.freeshell.org (192.94.73.8) / 192.94.73.8.tar / 192.94.73.8 / pub / sdf / faq / UNIX / 02 < prev    next >
Text File  |  2002-04-18  |  1KB  |  30 lines

  1. [02] WHAT ARE UNIX FILE PERMISSIONS AND HOW DO THEY WORK?
  2.   
  3.    UNIX treats directories, paging, memory, hardware devices, nearly
  4.    everything as a FILE.  Files have modes, and here they are explained.
  5.    NOTE, this is just basic information and not complete.  The following
  6.    should be all you need to know about UNIX FILES.
  7.  
  8.      u  g  o    l owner    group       bytes    date        file  
  9.    ---------------------------------------------------------------
  10.    drwxr-xr-x   7 nova     users        352 Jul 11 1992 /udd/nova
  11.  
  12.    UNIX treats everything (devices, directories, et cetera) as a file.
  13.  
  14.    u = user
  15.    g = group
  16.    o = other (everyone else)
  17.    l = links
  18.    d = directory
  19.    t = sticky bit
  20.    p = pipe
  21.    owner = the user id who owns the file
  22.    group = the group that owns the file
  23.  
  24.    You can use the chown, chmod and chgrp commands to modify files
  25.    chmod (change mode) allows you to alter the permissions of a file
  26.    using "u,g,o" .. for instance:  chmod ou-rx /udd/nova  would make
  27.    the above file unreadable to other users and users in the "users"
  28.    group.  chmod ou+rwx /udd/nova would give all other users access
  29.    to your directory (read and write).
  30.