|
BookMark Us
|
Please
so that you may come back to see what's new.
|
|
We're Rated With
|
|
|
|
| CHMOD TUTORIAL
|
| What is CHMOD
|
CHMOD
is the permissions you give uploaded .cgi, .pl,
.php, .php3, etc. files that make them work. It tells the server what someone
can or can't do. (eg: PERMISSION COMMAND)
|
|
The following shows the CHMOD variables and how it works.
|
Most FTP programs can change your file permissions.
The file permissions look like this:
755 is
-rwxr-xr-x.
Basically this is split into three sections:
SERVER GROUP CLIENT or
USER GROUP WORLD.
They both mean the same thing. User =
rwx Group =
rwx World =
rwx.
U = User
G = Group
W = World
|
r = Readable
w = Writable
x = Executable
- = No permission
|
U - G - W
| |
| drwxr-xr-x | = chmod 775 directory
|
| drwxrwxrwx | = chmod 777 directory
|
| -rwxrwxrwx | = chmod 777 file
|
| -rwxrwxr-x | = chmod 775 file
|
| -rwxr-xr-x | = chmod 755 file
|
| -rw-rw-rw- | = chmod 666 file
|
| -rw-rw-r-- | = chmod 664 file
|
| -rw-r--r-- | = chmod 644 file
|
The breakdown goes like this:
Read = 4
Write = 2
Execute = 1
Together they add up to 7 while only
Read and Execute would add up to 5 and so on.
I think you get the idea.
|
|
Directories have a 'd' in
front of the code as shown above, so a directory will look like:
drwxr-xr-x
|
| The format is this:
|
r = read - the entity is able to read the file or folder
w = write - the entity is able to write to the file or folder
x = execute - the entity is able to execute the file, or make it perform an action
Not all entities can perform the same actions, for different reasons. For example you would not like the client to be able
to write to a file as this would be totally non-secure, but you would want the server to be able to do that for obvious
reasons. If the entity cannot perform the action then a "-" marks that this
particular action is banned.
|
There is a numerical number for each of the file permissions. So
rwxr-xr-x would be
755. To change the file permissions, select the file and look for something in the
program that says:
"CHMOD" or
"Change file modifications/permissions".
Most of the time this is available by
right clicking on the file,
under most Windows 95/98/NT/2000/XP FTP programs, and selecting the Change Permissions menu item. I suggest that you use
SmartFTP, CuteFTP
or WS_FTP LE which are all freeware and available from various sites such as;
www.snapfiles.com
If you use a UNIX server then you need to type or change
CGI scripts to
755
(Or whatever the numerical equivalent is to the permissions you are trying to change)
Most Data/Text files are CHMOD = 644 which most cgi
scripts can write to without having to change the permissions. However, some scripts require that you change permissions to
777.
Most text files being written to by PHP scripts require a CHMOD of either
666 or 777
but could be one of the others.
This all depends on the script.
|
| Related Links:
|
If you need help with "Password Protection" or "Error Handling"
then try this tutorial.
Create a username:encrypted_password with our En-Crypt-It .htpasswd encryption generator.
|
Courtesy of:
|
|
|