Clan Adverts

www.afgserv.com

 

How To Chmod

Description: A short explanation of the various chmod file permissions and how to chmod a folder example.
Version: 1.0
Added on: 30 July 2008
Author: Ped
Difficulty Level: Very Easy
Views: 453
Detailed Profile

What is chmod ?
CHMOD stands for Change Mode and simply means that you are changing your permissions on the file or folder. "CHMOD" is also a UNIX command that is used in code and through the command line to change permissions on files and folders.

The chmod command allows you to set certain permissions for files on your Web server. For instance, 777 is a very common permission, though it can be a security risk (anyone can write to the file), allows everyone in every grouping to read, write, and execute the file.
The most common permission required to run a script is CHMOD 755

Here is some examples:

chmod 400 file - Read by owner
chmod 040 file - Read by group
chmod 004 file - Read by world
chmod 200 file - Write by owner
chmod 020 file - Write by group
chmod 002 file - Write by world
chmod 100 file - execute by owner
chmod 010 file - execute by group
chmod 001 file - execute by world

To combine these just add the numbers together:
chmod 444 file - Allow read permission to owner and group and world
chmod 777 file - Allow everyone to read, write, and execute file

Introduction
Being able to chmod a directory on your web server is a vital process that enables you to install and manage scripts and access rights, for users and the scripts you install.

Preparation
Im using WS FTP Pro which i can highly recommend as my FTP program, there are various free ones around, here is a list of open source FTP clients:
1 ) File Zilla
2 ) Smart FTP
3 ) Fire FTP (Used with Mozzila Fire Fox)

You can also connect using your web browser, but you dont get the options or control as you would using a program made for modifying and editing files.

Main Tutorial

A popular folder to chmod would be an uploads folder, if you are installing a script normally some instructions would come with it telling you what properties to chmod a directory to, in this case i need to chmod the uploads folder to 755

Firstly browse to the uploads folder location



Then we simply right click on the uploads folder and select the properties



As you can see from this next image the folder was chmodded to 666, to change it we simple edit the check boxes so the Numeric Value reads 755

Chmod to 666



Chmod to 755



Hit OK to save, i always refresh the window and check the properties again just to make sure they changed correctly.

Summery
So, there's some little FTP tips for those of you who might have had trouble installing scripts in the past. It might have been a permissions problem, so you should definitely revisit that script and it might just work now.

Hopefully I have given you some insight into the FTP technology and hopefully you will start using WS FTP or a similar FTP application that will give you more control over your websites, and allow you to install some scripts for better functionality on your site, And no im not getting paid to promote WS FTP, I highly recommend it as ive used it for 5 years without 1 single problem !