Skip to content

Instantly share code, notes, and snippets.

@cosmic76
Last active February 17, 2017 12:48
Show Gist options
  • Save cosmic76/2251a35da93d6cb4f3e54437dd53d110 to your computer and use it in GitHub Desktop.
Save cosmic76/2251a35da93d6cb4f3e54437dd53d110 to your computer and use it in GitHub Desktop.
The script to change permissions for the virtual hosts folder and files.
#!/bin/bash
user=user
group=user
dir=/var/www/html/$user/
chown -R $user:$group "$dir";
find "$dir" -type d -exec chmod 0755 '{}' \;
find "$dir" -type f -exec chmod 0664 '{}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment