PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 CHMOD 
Description: What CHMOD is, and how to use it
Author: Draegonis
Date: Tue Oct 29, 2002 4:57 pm
Type: FAQ
Keywords: chmod, permissions, ch-mod, 777, 644, 755, read, write, execute, file attributes
Category: Miscellanea
PLEASE NOTE: CHMOD WILL NOT WORK ON WINDOWS SERVERS!

--What It Is--

Chmod is simply a way of editing the permissions to a file - who gets to do what on it. There are 3 groups of user in chmod, and 3 permission states that can be given to them.

The 3 groups are:

User: That would be you, who owns the file/folder.

Groups: Groups are similar to the groups on phpBB. You can set a group of accounts, and then give them permissions via this option. Most hosts don't allow you to modify this however, and is mostly used for access by pre-defined scripts.

Other: Everyone else.

The 3 permission states are:

Read: The person can read into this file/folder.

Write: The person can write to this file/folder.

Excecute: The person can excecute this file (script).

--How to interpret it--

These, to be akward for the begginer, have been given numbers. you'll hear people say "chmod to 775". But what the hell does that mean?

Simple. If you can add, you've got it.

That number up there isnt seven-hundred-and-seventy-five. Its seven-seven-five. Each number in turn is for the permissions of each group.
The first number given is for "user", the second for "groups" and the third for "others".
Each permission state is given a number. 1 for "execute", 2 for "write", and 4 for "read".

How do we get the number 775? For the group "owner" we have:
1 [execute access] + 2 [write access] + 4 [read access] = 7.
For the group "groups" we have:
1 [execute access] + 2 [write access] + 4 [read access] = 7.
For group "others" we have:
1 [execute access] + 0 [no write access] + 4 [read access] = 5.
This means that the "user" and the "group" can do anything to the file, but anyone else can only execute it or read it. They can't modify it.

If you only wanted "user" to be able to access the file, giving them full permissione, you'd chmod it to 700 - "user" 1 + 2 + 4 = 7, "group" No premissions = 0, "Other" no premissions = 0

--Finale--

Most FTP clients have it laid out in an easy to use graphical interface, which can be accessed by right clicking on the folder/file you wish to CHMOD, and selecting the appropriate option ("File Attributes", "CHMOD", "File Permissions" & "Properties" are some of the most likley options).
Personally, I advise FileZilla. It's small, neat, handy, quick, easy to use, designed logically and most of all, it's free. It uses the "File Attributes" context menu for CHMOD options, and allows you to select CHMOD options from check-boxes, or you can specify a numerical value.

--What its used for in phpBB--

There are a number of files that require chmodded in phpBB to work correctly:

config.php: Chmod this to 777 BEFORE you start the install process. Once install is complete, chmod it back to 644.

By Default, All PHP Files should be chmod 644

/images/avatars: This is a folder that you have to chmod. This is so that, if you choose to enable avatar uploading, they can be uploaded properly. This folder must be chmodded to 777.

Delete, DO NOT chmod install.php, upgrade.php and update_to_***.php once you have finished your install/update process. It is a major security risk if there are left in your directory at all. Just delete them! The same goes for the install/uninstall files of any MOD.

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.