Change File Permission In Command Line

Posted on June 24, 2011

Find all file in the giving folder and change the permission to 644
find /path/to/apache -type f -print0 | xargs -I {} -0 chmod 0644 {}

Find all folder in the giving folder and change the permission to 755
find /path/to/apache -type d -print0 | xargs -I {} -0 chmod 0755 {}