Files and folders permissions with linux


In general the permissions of the files must be 755 and the files to 644. This is a non-strict generality, indeed, according to the applications, the permissions on certain files and files can vary greatly.

In the case of a problem that affects only the first level folders, so not many, it is necessary to apply a recursive patch that will apply to the subfolders of the processed folder.
(Note that in some cases, your folders may appear with 4 digits as 2755, this is an extended view, but it is equivalent to 755, no need to change it)

There is 2 ways to fix :
1. Filezilla in 2 steps
- right button of folder /all, change permissions, select folders only, and apply recursive to folders only : 755
- right button of folder /all, change permissions, select files only, and apply recursive to folders files: 644
 (In case these files should be at 664 for your app, you can apply this fix by using filezilla simply)
2. For lot of hierarchy, and files, use SSH
(which you have access if you wish on request, see our dedicated article)
Fix respectively folders and file permissions, here are examples with your values to replace :
cd /home/yourcpanellogin/public_html/folder1/folder2
find ./ -type d -exec chmod 755 {} \;
find ./ -type f -exec chmod 644 {} \;
find /home/yourcpanellogin/public_html/folder1/folder2 -type d -exec chmod 755 {} \;
find /home/yourcpanellogin/public_html/folder1/folder2 -type f -exec chmod 644 {} \;

Also Read

IP block by country

On 09/30/2016, due to the persistence of Russian, Chinese, Ukrainian spam traffic and attacks, we...

Protection WordPress xmlrpc.php

You are actually by default on mode PROXY with profile 'YOORshop defaut', this is good to know if...

Issues with displaying website or error pages...

A problem may appear suddenly, and/or have been caused by your own actions like updates and...

MANDATORY security measures for WordPress

It is not a secret, wordpress websites suffer from multiple attacks and increasingly causing...

Unsufficient disk space

In order to satisfy existing customers who evolve using a lot of disk space (superior to 80GB)...