Skip to content

Instantly share code, notes, and snippets.

@tuupola
Created March 8, 2012 12:05
Show Gist options
  • Save tuupola/2000723 to your computer and use it in GitHub Desktop.
Save tuupola/2000723 to your computer and use it in GitHub Desktop.
Update webserver permissions
#!/usr/bin/bash
for vhost in `ls /www`; do
if [ -d /www/$vhost/htdocs ]; then
/usr/local/bin/find /www/$vhost/htdocs -print0 | /usr/local/bin/xargs -0 chmod g+w
fi
if [ -d /www/$vhost/include ]; then
/usr/local/bin/find /www/$vhost/include -print0 | /usr/local/bin/xargs -0 chmod g+w
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment