beHosting.com
Please Login or Register

Knowledgebase

Changing File Permissions

The command to change permissions is chmod (change mode).    The permissions tell a file what can be done to it and who can do it.

What can be done?  Reading is just looking at a file's contents.  Writing is writing (or writing to) or deleting a file.  Executing is allowing file to run. This is only done to cgi program files.  Putting execute permissions on an HTML file is useless, because nothing "runs" in an HTML file.

Who Can Do It?  The owner is the owner of the file or directory (sometimes this can be a cgi program itself, it's not necessarily YOU).  The group permissions are for everyone in the group.  The global permissions are for anyone and everyone in the world!

Permissions are written two ways.  They are displayed with combinations of r, w, and x on the server (FTP, control panel, SSH, etc.), but when you are installing a script, reading the directions, they are displayed as numbers (777,755, etc.).  If you know how the numbers correspond with the letters, then you've got it made!

0 means no permissions (-)
1 stands for execute. (x)
2 stands for write. (w)
4 stands for read. (r)
So, read write and execute would be 4+2+1 = 7
The first number in 755 (or any other permissions setting) stands for the owner, the second stands for the group, and the third stands for everyone else!
So, if you are following this pattern, 777 = -rwxrwxrwx.  What if it says drwxrwxrwx?  The "d" simply means it's a directory.


Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Website Forwarding (Views: 562)
Dictionary (Views: 533)
Using a Secure Server (Views: 537)

Powered by WHMCompleteSolution

Quick Navigation

Client Login

Email

Password

Remember Me

Search