Fix file permissions

How toSecurity

Synching files and copying files between devices can sometimes lead to incorrect permissions.

Use the following lines to set them back to your desired permission based on their type, either Files [-type -d] or Folders [-type f].


cd /home/website/files/

#this line below will change all directories to 755
# you might want 700 also depending
find . -type d -exec chmod 0755 {} \;

#this changes all files to 644
find . -type f -exec chmod 0644 {} \;