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):