Chmod - Changing File and Folder Permissions

From Lunarpages Web Hosting Wiki
Jump to: navigation, search

The word chmod (shortened from change mode) is a command for Unix environments. When executed, it can change the permissions for files and directories. In the world of web hosting, it is often used as a slang word for changing your file and folder permissions under your hosting account. There are several different ways that you can chmod your files and folders. Most modern FTP clients support doing this, or you can change the permissions in your cPanel's File Manager or LPCP File Manager.

User Types

This is often separated into three types of users:

  • user - the owner of the file
  • group - users who are members of the file's group
  • world - anyone that is not the user or in the same group as the user

Permission Types

You also have three different types of permissions:

  • read - this will allow files and folders to be read by an assigned user group
  • write - with this permission you you would be given write access to a user group
  • execute - a user group with with this permission have execute access to a file or folder.


Changing Linux Cpanel File/Folder Permissions

  1. Login to cPanel
  2. Click on Legacy File Manager
  3. Navigate to the folder/file you want to change permissions on
  4. Click on the folder/file name (not the folder/icon beside it)
  5. Click on "change permissions" that will appear in upper right.
  6. Change to 755 (generally for folders) or 644 (generally for files)
  7. Click on change
Cpanel filemanager permissions.png

Changing Linux LPCP File/Folder Permissions

  1. Login to LPCP
  2. Click on File Manager
  3. Navigate to the folder/file you want to change permissions on
  4. Find the folder/file name and on the right side, under the Perms column click the current permissions (ie, drwxr-xr-x)
  5. Check or uncheck the boxes to set the read/write/execute permissions for owner, group, and public. Tip: This chmod calculator may help.
  6. Change to 755 (drwxr-xr-x for folders) or 644 (-rw-r--r-- for files)
  7. Click on the change button
Lpcp filemanager permissions.png


Changing Windows Hosting File/Folder Permissions

  1. Login to Plesk
  2. Click on File Manager
  3. Navigate to where you can see the folder or file you want to change the permissions for.
  4. Click on the padlock icon on the right hand side of the file / folder you want to change
  5. Click on Plesk IIS User or Pesk ISS WP User (depending on what you need to change)
  6. To the right, the options for changing the permissions for the particular user will then be enabled.


More chmod Frequently Asked Questions

How Do You Changing File/Folder Permissions via Your FTP Client?
Most modern FTP clients will allow you to change your file and folder permissions. For example, with FileZilla, all you have to do is right-click the file or folder in question, and then select "File Permissions...".

What Permissions Do Perl Files Need?
Perl Files (.pl/.cgi) will require the permissions set to 755 to run properly.

Why Can I Not Set Permissions Up As 777?
You should not chmod to 777 for security reasons. We run PHP as suPHP on our servers. All files on your account are owned by your user name. Due to this, permissions of 777 will not work. They will give an internal server error. Please try to use permissions of 755 instead.

Share |
Want to read this in another language?