Skip to content

Instantly share code, notes, and snippets.

@Alexisgt01
Created August 28, 2020 09:47
Show Gist options
  • Save Alexisgt01/f3dc5d2fe1351efc6724032c22484d2b to your computer and use it in GitHub Desktop.
Save Alexisgt01/f3dc5d2fe1351efc6724032c22484d2b to your computer and use it in GitHub Desktop.
#!/bin/bash
path=$1
if [ -z $path ]
then
echo "Path can not be empty"
else
chown -R $USER:www-data $path
find $path -type f -exec chmod 664 {} \;
find $path -type d -exec chmod 775 {} \;
chgrp -R www-data $path/storage $path/bootstrap/cache
chmod -R ug+rwx $path/storage $path/bootstrap/cache
chmod -R 777 $path/database
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment