Last active
January 27, 2023 18:21
-
-
Save eritislami/0cd59d7bc32ecf6bd92301c0f172b086 to your computer and use it in GitHub Desktop.
Set permissions for laravel application on ubuntu/nginx
This file contains hidden or 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
# Allow execution | |
# chmod +x ./setperms.sh | |
# Usage | |
# ./setperms.sh /var/www/domain.com | |
cd $1 | |
sudo chown -R $USER:www-data . | |
sudo find . -type f -exec chmod 664 {} \; | |
sudo find . -type d -exec chmod 775 {} \; | |
sudo chgrp -R www-data storage bootstrap/cache | |
sudo chmod -R ug+rwx storage bootstrap/cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment