Skip to content

Instantly share code, notes, and snippets.

@rahilwazir
Created March 15, 2017 06:57
Show Gist options
  • Save rahilwazir/558dbc689183ff27b6fc3ea8a8ee160a to your computer and use it in GitHub Desktop.
Save rahilwazir/558dbc689183ff27b6fc3ea8a8ee160a to your computer and use it in GitHub Desktop.
Fix permission in zsh
fix_permission () {
chown nginx:rw -R $1
find $1 -type d -exec chmod 755 {} \;
find $1 -type f -exec chmod 644 {} \;
chmod -R g+rwX $1
}
sdo() sudo zsh -c "$functions[$1]" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment