Talk martial arts at KarateForums.com

Bookmark and Share

CHMOD 2: Number CHMODing

CHMOD 2: Number CHMODing

Postby Jaeboy » June 18th 2003, 10:59 am

      The tutorial from Rapid Dr3am is good, but is usually used by developers and/or command prompt users, so I've created a standard CHMODing tutorial that is used by most FTP software. Have Fun!

      What is CHMOD:
      CHMODing defines a user's right to access/view/modify a file and it is divided in 3 categories
        Owner | Group | Public

      Complete CHMOD Table:
      Code: Select all
              |   Owner   |  Group   | Public 
      Read    |           |          |        
      Write   |           |          | 
      Execute |           |          | 
      


      Read means, allow browser to read the file
      Write allow user to make changes via browser or any HTTP protocol
      Execute is for executing scripts such as php etc.

      777 gives full right to all user

      777 means that Read is allowed, Write is allowed, Execute is allowed.


      Code: Select all
              |   Owner   |  Group   | Public 
      Read    |    OK     |     OK   |     OK 
      Write   |    OK     |     OK   |     OK 
      Execute |    OK     |     OK   |     OK 
      Result=       7           7           7 
      


        Read gives 4 points
        Write gives 2 points
        Execuite gives 1 point

      For example if i want to allow owner to read/write/execute while preventing group and public to write, it should look like 755.

      Code: Select all
                | Owner   |  Group |  Public 
      Read(4)   |   OK    |   OK   |   OK      
      Write(2)  |   OK    |   No   |   No 
      Execute(1)|   OK    |   OK   |   OK 
      Result  =      7        5        5 
      


      And if I want to prevent allow owner to still have r/w/e but allow group and public to r/w but not execute it sould be 766.

      Code: Select all
                | Owner   |  Group |  Public 
      Read(4)   |   OK    |   OK   |   OK      
      Write(2)  |   OK    |   OK   |   OK 
      Execute(1)|   OK    |   No   |   No 
      Result  =      7        6         6 
      


        Always remember this table:
        Code: Select all
        
                  | Owner   |  Group |  Public 
        Read      |   4     |   4    |   4      
        Write     |   2     |   2    |   2 
        Execute   |   1     |   1    |   1
        
          Result = 7 7 7

      FAQ: I am using a Windows operating system, why can't I use this function?
      Answer: CHMOD is for *NIX users only (Linux, Unix, etc.)

      Note: This article is based on my own knowledge, please correct me if am wrong


See also: CHMOD File Permissions.
I love that Cat
User avatar
Jaeboy
Well Known User
 
Posts: 285
Joined: October 17th 2002, 3:00 am
Location: HkG SAR

Return to phpBB 2: Tools and Related Topics

Who is online

Users browsing this forum: No registered users and 1 guest