Skip to content

Instantly share code, notes, and snippets.

@rpowis
Last active April 7, 2017 17:49
Show Gist options
  • Save rpowis/5681924 to your computer and use it in GitHub Desktop.
Save rpowis/5681924 to your computer and use it in GitHub Desktop.
Git hook to fix permissions on mediatemple dv after a git pull
#!/usr/bin/env bash
#
# How to use this file:
#
# 1. Clone/copy this gist into the .git/hooks directory
# 2. Enter the website's domain and server's admin username in the variables
# 3. Make the file executable using: $ chmod +x post-merge
#
DOMAIN=""
ADMIN=""
cd /var/www/vhosts/${DOMAIN}
chown -R ${ADMIN}:psacln httpdocs
chown ${ADMIN}:psaserv httpdocs
echo ">>>>> Permissions fixed! <<<<<"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment