Set correct permissions on your linux/apache website files and directories
This will help you to easily set correct permissions on your linux/apache website files and directories with one command
As root cd to the ‘document root path’ of your website directory (ie: html, htdocs, httpdocs) and do as follows
find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;
or
find /path/to/docroot/. -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;
this sets all your files to 644 and all your directories to 755
for example,
cd /var/www/html
find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;
As found at linux-noob.com
Popularity: 100% [?]



