Files
general-scripts-and-system-…/customscripts/fix_permissions
T

12 lines
306 B
Bash

#!/bin/bash
[ "root" != "$USER" ] && exec sudo $0 "$@"
webdir=/var/www
www_group=www-data
userfriend=princesspi
find "$webdir" -type d -exec chmod 775 {} \;
find "$webdir" -type f -exec chmod 664 {} \;
find "$webdir" -type f -iname "*.sh" -exec chmod 775 {} \;
chown -R $userfriend:$www_group "$web_dir"