Advertisement
killtdj

Laravel permission

Sep 6th, 2022 (edited)
864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.53 KB | None | 0 0
  1. sudo chown -R www-data:www-data /path/to/your/laravel/root/directory
  2. sudo usermod -a -G www-data<user>
  3. sudo find /path/to/your/laravel/root/directory -type f -exec chmod 644 {} \;    
  4. sudo find /path/to/your/laravel/root/directory -type d -exec chmod 755 {} \;
  5. cd /var/www/html/laravel (direct to current laravel directory)
  6. sudo chown -R $USER:www-data .
  7. sudo find . -type f -exec chmod 664 {} \;  
  8. sudo find . -type d -exec chmod 775 {} \;
  9. sudo chgrp -R www-data storage bootstrap/cache
  10. sudo chmod -R ug+rwx storage bootstrap/cache
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement