Articles

How to reset file permissions via SSH

If you need to reset a lot of file permissions then the following two lines of code will do it very quickly from the command line. Your ftp client can be very slow at changing the permissions on a lot of files.

This will recursively search your directory tree starting from your current directory and chmod 755 all directories.

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

This will chmod all files and ignore the directories

find . -type f -exec chmod 644 {} \;