How to recursively update file permissions with linux


You may have a site with incorrect permissions for a number of reasons...

Here is how to fix permissions for most content management systems and web applications. This can often fix 500 errors and insecure file permission issues. However, we recommend you read the documentation regarding the best practices for the framework you are using.

How to recursively change permissions on all files:

  1. Navigate to your public_html folder, or web root
  2. Run the following:
    find . -type d -exec chmod 755 {} \;

How to recursively change permissions on all folders:

  1. Navigate to your public_html folder, or web root
  2. Run the following:
    Run the following: find . -type f -exec chmod 644 {} \;