Super Web Mart - Discount Coupons & Deals - Discount Promos, Coupon Codes, Discount deals and web site reviews
 

Author Topic: Learning CHMOD From Scratch  (Read 1579 times)

0 Members and 1 Guest are viewing this topic.

Offline HomeOffice

  • Jr. Member
  • **
  • Posts: 37
  • Info-Search/Sales, Web Development, & Marketing
    • View Profile
    • Promodrone
Learning CHMOD From Scratch
« on: October 18, 2012, 07:41:09 AM »
In a nutshell, CHMOD is all about what permissions a server has to be able
to access all the given files and directories that exist upon it. Numerically;

0 = no operations allowed
1 = execute permission or the ability to cd in the case of a directory
2 = write permission
4 = read permission

Every file has permissions for owner (you), group (directory users), and world (global site users).
To define the permissions you want for a file, add up the numbers of each class the file will have to chmod it.

The home directory will have permissions 711 (server default) meaning:
7 = 4+2+1:You (the owner) can read/write/execute
1 = 1:Other users in your group can cd/execute but not read or write
1 = 1:Other users not in your group can cd/execute but not read or write

The public_html directory with permissions 755:
7 = 4+2+1:   You (the owner) can read/write/execute
5 = 4+1:    Other users in your group can cd/execute/read but not write
5 = 4+1:    Other users not in your group can cd/execute/read but not write

Files that you create in the public_html directory must have at least permissions
644 (directories must be 755) or the server can't read them and they won't be "online".
To make the directory images and all its files world readable (and avoid all those, "Why
can't I see my pictures in my website online?" questions) chmod 755, and if you want to
"disappear" a file, chmod 700 (makes file unreadable to server).

Webmaster Forum

Learning CHMOD From Scratch
« on: October 18, 2012, 07:41:09 AM »