CHANGE FILE PERMISSIONS TO 644 AND DIRECTORY TO 755 MASSIVELY

File permissions, by default on a website, should be 644 for files and 755 for folders.

If for some reason you have changed them or if some plugin or module has created directories with different permissions, just run this command from the root directory (www, public_html, htdocs, httpdocs...) to change them recursively.

The following two lines change the permissions recursively from the current directory to all directories and files within it. That's why it's a good idea to run it directly in the root directory where you have the web.

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

Write it down for the next time you desperately change the file permissions to 777.

Need a Drupal Expert?

Senior Drupal developer, freelance, specialized in what's hardest: migrations, multilingual sites, SaaS platforms and Stripe integration. I leverage AI to cut delivery times and costs, with expert review on every line of code.

No agency, no middlemen. Direct contact with the one who does the work.