Skip to main content
Home
Nicholas Mangold

Main navigation

  • About
  • Projects
  • Blog
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Blog

Set file permissions on all subfolders

Changing the file permissions of only the directories, or only the files, under a directory can be a cumbersome task if you have taken the approach to manually look for only the directories and set file permissions individually. Thankfully, the following commands will find the directories and files respectfully under the sites/default/files/ directory, and change them to the most common file permissions for public files on a web server. To change all the directories to 755 (drwxr-xr-x): 

find sites/default/files/ -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--): 

find sites/default/files/ -type f -exec chmod 644 {} \;
Tags
File Permissions
About text formats

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Cornell (not verified)

7 years 6 months ago

An іmpressive share!

An іmpressive share! I have just forԝarded
this onto a coworkеr who has been doіng a little
homework on this. And he in fact orԁered me dinner
simply beϲause I found it for him... lol. So
allow me to reword this.... Thanks for the meal!!
But yeah, thanks for ѕpending time to discuss this issue here on your blog.

  • Reply

Jenifer (not verified)

7 years 5 months ago

Viewers will help

Actually no matter if someone doesn't understand afterward its up to other viewers that they will help, so here it takes place.

  • Reply
  • Add new comment

Certifications

Badge for the Acquia Certified Developer - Drupal 7 certification
Badge for the Acquia Certified Front End Specialist - Drupal 7 certification
Badge for the Acquia Certified Back End Specialist - Drupal 7 certification
Badge for the Acquia Certified Grand Master - Drupal 7 certification

Recent Projects

Argonne National Laboratory

Screenshot of the Argonne National Laboratory homepage

Texas OAG

Screenshot of the Texas OAG homepage

Siemens PartQuest

Screenshot of the  Seimens PartQuest homepage

DODEA

Screenshot of the DODEA homepage
View more projects

Recent blog entries

  • How to use sudo with Touch ID on macOS Sonoma 14.x and above
  • Drush throws an "Access denied; you need (at least one of) the PROCESS privilege(s)" error message
  • Troubleshooting "ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) the SUPER privilege(s) for this operation"
  • How to set up a local Drupal environment
  • How to use sudo with Touch ID on a Mac
View more blog entries
RSS feed
Powered by Drupal