Learn to configure File Permissions in File Manager
Introduction
It is highly essential to set proper file permissions for a site. It provides security to your web files. Proper permissions also help your site work correctly. You can easily manage these settings with cPanel’s File Manager. This article provides steps on how to do it.
What are File Permissions?
File permissions are a set of rules. They determine access to your files and folders. These apply to Linux-based systems such as your web server. They determine the actions that various users are allowed to undertake. Well, permission is of three types:
Read (r): This access allows a user to read the content of a file. Its numerical value is 4. In the case of a folder, it allows a user to list the contents.
Write (w): This is permission that enables a user to modify or delete a file. Its numerical value is 2. In the case of a folder, it enables the user to create or delete files within the folder.
Execute (x): This is a permission that allows a user to execute a file as a program. Its numerical value is 1. In the case of a folder, it enables a user to access the folder.
These permissions are assigned to three user groups. They are User (the owner of the file), Group (the other users of the same group), and World (all other users).
These permissions can be combined. The total is a three-digit number. As an example, a file that is read and writable by the owner has a value of 6 (4+2). In case it is also read-only to the group and to the world, the full permission is 644.
Setting Permissions for Your Website
Your website files need the right permissions so that the web server to access them. Your site might fail to load without the right permissions. The following are common permission settings:
HTML and image files: The permission of these files should be 644. This allows the owner to write and read. It permits the group and world to read the file. In the majority of cases, this permission is automatically configured when uploading such files.
Directories (folders): The permission of directories should be 755. This provides the owner with complete control (read, write, execute). It provides the group and world with read and execute rights. This is also usually set automatically.
CGI files: CGI files are executable programs. Their permission should be 755. This allows them to be run by the web server. This permission may have to be manually set as opposed to other files.
How to Change File Permissions
Follow these simple steps using cPanel’s File Manager.
- Access your cPanel account.
- Find Files section. Click on the File Manager icon.
- Choose a file or a folder that you want to modify and right-click on it.
- Click the Change Permissions option. A new window will open.
- Set the desired permissions using the checkboxes. The numerical value will vary as you tick the boxes.
- Save the changes: Save the changes by clicking the ‘Change Permissions button’.
The permissions have now been updated.
Web Hosting Features of Cantech
The hosting services of Cantech include a user-friendly cPanel. We have a convenient File Manager in our cPanel that simplifies the management of your files. You can easily check and change file permissions. This assists in securing your site. Customer support is also good and always available with our web hosting. Our team can help you with any inquiries or issues 24/7.
Conclusion
An Important aspect of managing websites is to set the right file permissions. It secures your files and makes your site operate smoothly. CPanel’s File Manager is an excellent tool for this. It allows you to modify permissions easily and fast. This provides you with complete control of your files.
FAQs
What happens if I set incorrect file permissions?
Wrong permissions may lead to issues. A permission that is too low might prevent your website from working. An excessively high permission may pose a security risk.
Which file permission is the safest?
The most secure permission is a low number like 600. This provides the owner with only read and write access. This, however, can be too limiting for a site. The web server must be able to access the files.
What does 777 permission mean?
Everyone has complete read, write and execute access to a 777 permission. It is a very risky setting. You should avoid it on live websites. This can easily allow attackers to upload or modify files.
Why do CGI files need a permission of 755?
CGI files are scripts or programs. They need to be executed by the web server. The 755 permission allows this. It provides the owner with complete access and allows other people to run the file.
What are the existing permissions of my files?
The existing permissions can be viewed in cPanel File Manager. It appears in a column beside the name of the file or directory.