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?

 Print this Article

Also Read

Using a Secure Server

BeHosting has a server-wide secure certificates installed for your use. There is no need to put...

Website Forwarding

How do I forward a site or a page of my site to another site? In your control panel is a button...

Control Panel Buttons

For help with your control panel, please visit the help and video tutorial buttons on the top...

mySQL database connection variables

Most of the time, these variables will be all you need to connect to your mySQL database:Database...

Dictionary

Here are some terms you may hear us use:ISP (Internet Service Provider) - a company that provides...

Powered by WHMCompleteSolution