#!/bin/bash if (( $# != 1 )); then echo "Usage: `basename $0` dir" fi DIR=$1 USER=root /usr/local/sbin/set-httpd-permissions.sh $DIR rc=$? if (( $rc != 0 )); then exit $rc fi if [[ ! -d $DIR/wp-content ]]; then echo "Unable to find $DIR/wp-content" exit 1 fi chmod -R u+w $DIR/wp-content find $DIR/wp-content -name .htaccess -exec chmod 464 {} \;