chmod recursive folders only

Dragan Eror's picture

Drupal default files and folders permission.

Folders:
find . -type d -exec chmod 755 -R '{}' \;

Files:
find . -type f -exec chmod 644 -R '{}' \;

Comments

kotnik's picture

Directories with spaces in name

This will fail if a directory has a space in name.

Fix:


find . -type d -exec chmod 755 -R '{}' \;

Dragan Eror's picture

Updated!

Thanks, post is updated! :)

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.