Miscellaneous

  Home arrow Miscellaneous arrow Page 2 - Rights Management in UNIX
MISCELLANEOUS

Rights Management in UNIX
By: Gabor Bernat
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2009-03-25

    Table of Contents:
  • Rights Management in UNIX
  • Groups and rights
  • Change the rights
  • Some extra rights

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Rights Management in UNIX - Groups and rights


    (Page 2 of 4 )

    The system splits users into four categories, from the point of view of identifying the rights:

    1) The user => symbolized in the chown command by a u letter.

    2) The group => g

    3) The others => o (users who are not in the users group or not the user)

    4) And finally, all => a (everybody)

    There are three types of rights:

    a) read => r 

    b) write => w

    c) execute => x

    These are the three tasks a user can do with a file or a directory. We can see this with the ls –l command typed into the terminal. This will list the rights for the current working directory files in the first columns of what appears when the command is used.

    For the first three user groups, there is an individual setting. These are written one after another. Where a right is in place, the corresponding letter is written. Otherwise, a minus is printed there.

    Let there be the right of rw---xrwx. We will split it into three categories, grouped by three letters. We will have the right of rw- for the user. This means he can write it and read it; however, he cannot execute it. The second group is “--x” and means that the people in the user's group can execute the file. The last three letters, rwx, are all turned on so everybody else can do what they want with the file.

    Summing up, rights management is like a code where every letter can be further expanded into the rwx trio. Of course, we can also work with binary numbers when we expand a letter. Let there be one if a right is active and zero otherwise. Now a letter (group) will form an octal number.

    Octal numbers are represented on three bits. 110 is equal to 1 * 2^2 + 1 * 2^1 + 0 * 2^0, which is also equal to 6. Now we can write all the rights with just three numbers, as long as we write the decimal pair of the octal number. Thus, 766 represents 111 110 110, which reserves for us and us alone the right of execution. The order is always user/group/others, or ugo. 

    More Miscellaneous Articles
    More By Gabor Bernat

    blog comments powered by Disqus

    MISCELLANEOUS ARTICLES

    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength
    - Install Slackware on Your Old PC


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap