Скрипт для смены прав

#!/bin/bash
dir=/var/www/site
user=root

echo "Set permissions for $dir...";
echo "CHOWN files...";
chown -R $user:$user "$dir";
echo "CHMOD directories...";
find "$dir" -type d -exec chmod 0755 '{}' \;
echo "CHMOD files...";
find "$dir" -type f -exec chmod 0644 '{}' \;