Security experts from Reviewedbypro.com have shared with us their knowledge how to make your WordPress website more secure by fixing file and folder permissions. If you run a WordPress website, you could probably agree that it is so frustrating to receive an error while trying to update your site. However, just like any other Content Management System, WordPress also has a few annoying quirks.
[bctt tweet=”#File and #Folder Permission #Error is probably one of the most annoying and common errors received while running a #WordPress #website.”]
File and Folder Permissions Error can prevent users from interacting with the managed website, as it affects creating files and updating files’ settings.
But do not panic. This issue can be quickly fixed if the correct steps are taken. Lets’ take a closer look at how permissions work in WordPress.
Table of Contents
File and Folder Permissions help to manage the site security
WordPress, just like any other content management system, has its own set of files and folders stored on the web hosting. Every file and folder also comes with a set of permissions that govern who can interact with them. In other words, to create folders and modify files, users have to have the required privileges.
For instance, if you have administrator privileges, you might set a certain folder as read-only for those who do not have administrator privileges, so you will be able to read, write and execute the folder, while others, non-admin users, will only be able to read it.
File and Folder Permissions:
- Read: the ability to read a file.
- Write: the ability to modify a file.
- Execute: the ability to execute a file.
Setting the necessary permissions on the WordPress site is important. Thus, if the permissions are too loose, the site could be exploited by attackers. Also, if the permissions are set too strict, it could prevent legitimate actions.
Just right permission settings keep WordPress site safe and protected. No one wants public users or even group users to have access to the core WordPress files. However, it is also important to allow WordPress necessary permissions to take legitimate actions and fulfill its duties.
File and Folder Permissions Error is an access issue
If you received File and Folder Permissions error, keep in mind that it is an access issue. Firstly, you should run across the error, once you receive it.
The File and Folder Permission error can appear in different messages, depending on the action you want to take, such as “403 forbidden error” or “not eligible to do this task.” The error message directly signifies the wrong permission settings.
Resolve the File and Folder Permission Error
File and Folder Permission Error is actually non-critical and can be easily fixed. We will provide you with two different methods to fix this annoying error.
How the File and Folder Permissions are calculated
Users should be aware that the Files permissions should be 644 and Folders permissions should be 755.
There are three groups:
Self – an admin user.
Group – an admin user and other users with privileged permissions. If the site can be accessed with more than one username, then the other ones are the part of the group.
Public – website visitors.
As it was mentioned before, the permissions include the following:
These permissions are given numbers, such as Read stands for 4, Write stands for 2, and Execute stands for 1.
These numbers can be added up, if you select all of the permissions, the numbers are added up and become 7 – Read, Write and Execute.
If anyone is chosen to read an execute for the group, the permission number becomes 5.
If the permissions are set to 4 – it means that users are only able to Read.
If we combine the numbers, it becomes 755 or 644 file permissions.
By setting your permissions as recommended, you will not receive File and Folder Permission Error. However, some people prefer not to use plugins. In that case, we have provided you with the second method.
Method 1: Fix the File and Folder Permission Error using the Web Hosting cPanel
As it was already mentioned, you can fix the File and Folder Permission error by using an FTP account or if you prefer, directly visiting the web hosting website.
- Firstly, you have to log in to the cPanel account and launch the File Manager.
- Open the Root Directory of the website, where the data is located (in most cases it is public_html or www).
- Launch the root directory. Files and folders will appear here.
- Select all the Folders and right-click on them to see the option to change permissions. Alternatively, you can select the folders and click on the Permissions link.
- Once this step is completed, you will be provided with the window of current permissions. Update it to 755 by clicking change permissions. If the permissions were already 755, you do not have to do anything.
Once you are done with folders, you do need to update Files permissions:
- Select all of the files in order to follow the steps you have already completed with folders. Note: Make sure to select all the files and do not select any folders, because if a single folder is selected, you will be displayed with Folder permissions.
- So, select all the files and right-click on them to choose the Change Permissions
- If your File permissions are set to 644, you do not have to take any action, if not – click the change permission button and update the number to 644.
- Finally, clear the browser cache.
Method 2: Fix the File and Folder Permission Error using FTP client software.
To do that, you need to download FTP client software. For example, you can use free software FileZilla.
- Enter correct FTP host, username and password and connect to your FTP server, where all your files are stored. If you don’t know your FTP username and password, ask for the help your hosting service provider or check your server console (etc.: DirectAdmin, Plesk, cPanel)
- After connecting to the FTP server, navigate to the directory where all your files are stored and set right folder permissions:
All .php files
- Select with the mouse cursor desired folder. For example “wp-content”
- Press right mouse button, navigate “File permissions”
- Another window will appear. Mark the checkbox as show bellow or enter a number in “Numeric value” field “755”.
- Also, check the “Recurse into subdirectories” and “Apply to all files and directories” if you want all files and folders in this directories would become with permissions “755”. We recommend using this option for highly experienced users ONLY.
- Repeat this process and set right permission to all files and folders (check the table above one more time if you forgot).
Congratulations! If all the steps were taken correctly, you should not receive the File and Folder Permission Error while trying to update your WordPress site.