Forked from mehrdadx10/gist:e39d8aabe176b70c3fb12045a1c845a2
Created
September 13, 2021 05:58
-
-
Save rezakhademix/85cc410d787cc239831aab902fb1f2fc to your computer and use it in GitHub Desktop.
laravel file permission
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
| # user as owner | |
| sudo usermod -a -G www-data $USER | |
| 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 | |
| # webserver as owner | |
| sudo usermod -a -G www-data $USER | |
| sudo chown -R www-data:www-data . | |
| sudo find . -type f -exec chmod 644 {} \; | |
| sudo find . -type d -exec chmod 755 {} \; | |
| 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