Wednesday, 20 October 2010

script to set drupal permissions

#! /bin/bash
cd /var/www/drupal
chown -R drupmin:www-data .
find . -type d -exec chmod u=rwx,g=rx,o= {} \;
find . -type f -exec chmod u=rw,g=r,o= {} \;

cd sites
find . -type d -name files -exec chmod ug=rwx,o= '{}' \;
find . -name files -type d -exec find '{}' -type f \; | while read FILE; do chm$
find . -name files -type d -exec find '{}' -type d \; | while read DIR; do chmo$


echo "Permission rebuildng is done!"

No comments:

Post a Comment