Skip to content

Instantly share code, notes, and snippets.

@solancer
Forked from ClaudioVarandas/laravel_perm.sh
Last active December 19, 2017 16:37
Show Gist options
  • Save solancer/7ac5efe53e6cbc94d0f289e111d9b49b to your computer and use it in GitHub Desktop.
Save solancer/7ac5efe53e6cbc94d0f289e111d9b49b to your computer and use it in GitHub Desktop.
Laravel permissions
# add sudo user to www-data group
# usermod on your user. So that would be
sudo usermod -aG www-data srinivas
# set perms with sudo user in accordance with apache user
sudo chown -R srinivas:www-data .
# change group perms of storage and cache folder to exlcusively support only apache user
sudo chgrp -R www-data storage bootstrap/cache
# declare user and group permissions on the same
sudo chmod -R ug+rwx storage bootstrap/cache
# unmask hack to set www-data for newly created files
sudo chmod g+s storage bootstrap/cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment