Learn about Web Hosting and CHMOD File Permissions

Learn about Web Hosting and CHMOD File Permissions
Page content

What are File Permissions?

File permissions are what grants people the ability to use, execute, or edit files on your web server. Certain files must have certain permissions in order to function properly on the website, and others should be protected for security reasons. Setting your file permissions can be a tedious task if you are not familiar with what files should have what permissions. Generally, most web hosts have guides that will assist you with your file permissions, and if you have a file permission set wrongly, they will help you find the error.

The options for file permissions are:

  • No permission, meaning the user cannot do anything.
  • Execute only, meaning the user cannot read or write the file.
  • Write only, meaning the user cannot read or execute the file, only being allow to write to it.
  • Write and Execute
  • Read Only
  • Read and Excecute
  • Read and Write
  • Read, Write, and Execute

Changing File Permissions

Somewhere in your hosting control panel, you’ll find the place you need to change your file permissions. You should always leave your file permissions alone unless something you are using on your website (such as WordPress or osCommerce) suggests that you change your permissions and tells you which files to alter. Given the varying nature of hosts and control panels, we cannot give you a specific course of action to take on how to get to where you need to be to change your file permissions, but you’ll see something with check boxes with options such as, “r-w-x” or be asked to enter a CHMOD value.

What the heck is CHMOD? It’s a UNIX code of numerical values that tells the host which commands to follow from the list above. The numbers 0 through 7 are placed respectively above. A CHMOD code consists of three numbers, one for the file owner, one for the group, and one for anyone else.

For example, the CHMOD code 777 means that everyone can do anything to the file. The code 650 means that the file owner can read the file and write to it, the group can read and execute it, and no one else can do anything at all to it. The number 740 means that the owner can do anything, the group can read the file, and no one else can do anything at all to it.

Use caution when editing file permissions to protect your information and keep your site running smoothly.