Last active
December 17, 2019 04:08
-
-
Save epicsagas/b767e61edb6db6dfb3b603ac60a0ed8e to your computer and use it in GitHub Desktop.
Fix laravel directory permission
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/bin/bash | |
# commands are from https://tecadmin.net/laravel-file-permissions/ | |
user=$1 | |
group=$2 | |
dir=$3 | |
chown -R $1:$2 $3; | |
find $dir -type f -exec chmod 644 {} \; | |
find $dir -type d -exec chmod 755 {} \; | |
cd $dir; | |
chgrp -R $user storage bootstrap/cache; | |
chmod -R ug+rwx storage bootstrap/cache; | |
usermod -a -G $user $group; | |
echo "All done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment