Skip to content

Instantly share code, notes, and snippets.

@sashagoebbels
Created September 12, 2017 10:51
Show Gist options
  • Save sashagoebbels/9377a3a5ceeb35f09b1dfc8b079887b6 to your computer and use it in GitHub Desktop.
Save sashagoebbels/9377a3a5ceeb35f09b1dfc8b079887b6 to your computer and use it in GitHub Desktop.
function chmown {
if [ -z "$1" ]
then
echo "Usage: chmown <rights> <owner> <target>"
return 1
fi
if [ -z "$2" ]
then
echo "Usage: chmown <rights> <owner> <target>"
return 2
fi
if [ -z "$3" ]
then
echo "Usage: chmown <rights> <owner> <target>"
return 3
fi
chmod -R $1 $3
chown -R $2 $3
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment