Design & Development > Webmaster Tools & Resources

Learning CHMOD From Scratch

(1/1)

HomeOffice:
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).

Navigation

[0] Message Index

Go to full version