Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rezakhademix/85cc410d787cc239831aab902fb1f2fc to your computer and use it in GitHub Desktop.

Select an option

Save rezakhademix/85cc410d787cc239831aab902fb1f2fc to your computer and use it in GitHub Desktop.
laravel file permission
# 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