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

Issues with displaying website or error pages...

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

Where to find a webmaster

Web agency cheap in Maroc (30€/hour) : India :...

Optimal technique for DNS update

The DNS to be inserted for your hosting service are mentioned in the email of access that...

How to use CGI scripts

CGI is installed on all accounts of course, but is disabled by default for security reasons...You...

Protection WordPress xmlrpc.php

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