Administration
  Home arrow Administration arrow Page 4 - CHMOD: Tool for Open Source Administra...
FaxWave - Free Trial.
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
eWeek
 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? 
ADMINISTRATION

CHMOD: Tool for Open Source Administration
By: Drew Decker
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 29
    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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    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


       · Darwin Linux???
       · You mean "octal", i.e., base 8. Why spend so much wordage introducing IPs and octets...
       · should be darwin linux :D!
       · I have my way of explaining things. Is it because I'm 19 or it because I'm full of...
     

       

    ADMINISTRATION ARTICLES

    - 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
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway