How to Change File Permissions In cPanel

How to Change File Permissions in cPanel?

Permissions can be very important when it comes to hosting your websites and web applications. Permissions can allow our server computer to write and edit your files. Along with that, some files need to be protected from writing and editing, as a security measure. You can change your file permissions in many ways.

Here you can learn how to change file permissions in cPanel. Each file and directory (/folder) in your account has special permissions which control who can readwrite and execute that file. When files are created, default permissions are assigned. Most users won’t need to change permissions, but there are times when an update, installation, etc. will require a file permissions to be change. File permissions can be viewed and can be changed through either the cPanel File Manager or most FTP (File Transfer Protocols) programs.

Step 1. Log into your cPanel.

Login to cpanel

Step 2. Click the File Manager link in the Files section.

File manager

Permissions sections

public_html – 750
Folders – 755
CGI and Perl scripts – 755
.html .php and other Document Types – 644

Step 3. In the File Manager select the file you want to change the permissions for, then click the Permissions link on the top.

Changing the File Permissions
You can also right-click and select Change Permissions from the list.

Step 4. This will bring up the Change Permissions window as shown below. Adjust the settings as needed by checking the box by each permissions you want for each level of access (User, Group and World).

Permissions sections

Once you are finished editing your file for each level of permissions (User, Group and World) then click the Change Permissions button to change the selected permission.

Congratulations, now you know how to change your file permissions in cPanel!

What Are The Incorrect File Permissions?

Incorrect file permissions can cause errors or even worse, allow unauthorized users to hack your site. Once an unauthorized user gains access over your web applications or web scripts, they can further alter more of your file permissions to make a site even more vulnerable. Remember that 777 permissions means that your file is readable, writable and executable by the “world”. This is not a common permissions, as it is a rare situation where a file needs to be written and executed by the “world.” If you find files or folders with permissions that do not match the default permissions, it’s usually best to change them to the above recommended permissions.

Drop Your Comments Below