Administration
  Home arrow Administration arrow Page 4 - CHMOD: Tool for Open Source Administration
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ADMINISTRATION

CHMOD: Tool for Open Source Administration
By: Drew Decker
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 31
    2005-12-05


    Table of Contents:
  • CHMOD: Tool for Open Source Administration
  • chmod Reasoning
  • Switches
  • Modes
  • Mentally Converting from “read/write/execute” to 777

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    CHMOD: Tool for Open Source Administration - Modes
    ( Page 4 of 5 )

    Basically modes are a simple way of saying permissions. There are a few exceptions to this rule, but they aren't part of this article. There are three basic modes: -r (read), -w (write), -e (execute). See the chmod figure.


    CHMOD Figure

    Later in this article, I’ll explain how you can find out the number system for certain modes (permissions). Modes to a basic extent is very easy and simple. You have three numbers: the first number is for the owner, the second for the group, and the third for the world. Depending upon the numbers, you will get a certain permission assigned to the respective object. We will use the examples from above:

    Bash

    • chmod -v 755 /Test

    This states that the owner is assigned Read, Write, and Execute permissions; groups that are assigned to the file/directory get Read and Execute permissions; world (other) also gets Read and Execute permissions.

    Take a break. Drink some coffee or tea. If you're avoiding caffeine, do 100 jumping jacks. Then come back for the fun part: binary/octet conversion.

    The Structure of chmod octet

    You see octets all the time. If you recall, an IP address is a series of four (4) octets. Simply put, an octet is eight bits of data. So in an IP address you have your localhost (127.0.0.1). You have four octets: 127, 0, 0, and 1. We now have to go back to remembering binary. Even though it might be a one (1) it is still set in binary as 0001, which is 1 bit of data. With an IP address, however, it is viewed as eight bits in binary, so it would look like 00000001, thus the eight bits - octet (Figure 1).


    Figure 1

    So what’s this have to do with chmod? Well, in order to make permissions with chmod using the numerical format, you have to know how to convert the permission (binary) to octet. Read = 4, Write = 2, Execute = 1. Do you see the pattern? If you don’t, look at Figure 1; it goes: 1, 2, 4, 8, 16, and so on. We only need the first three bits of binary: 1, 2, and 4. This is a simple structure of the chmod’s octet.



     
     
    >>> More Administration Articles          >>> More By Drew Decker
     

       

    ADMINISTRATION ARTICLES

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek