Answer the question
In order to leave comments, you need to log in
What permissions should I set for each folder inside a Laravel project?
By negligence, I set the rights entirely to the entire project 777. In the official documentation, I only found that the rights to the storage, public and bootstrap / cache folders should give the right to write. But what about the rest of the directories? What minimum rights should be set separately for app, bootstrap, config, database, public, resorces, routes, vendor, storage?
Answer the question
In order to leave comments, you need to log in
1 you need to make the web server the owner of the files
sudo chown -R www-data:www-data /path/to/your/laravel/root/directory
sudo find /path/to/your/laravel/root/directory -type f -exec chmod 644 {} \;
sudo find /path/to/your/laravel/root/directory -type d -exec chmod 755 {} \;
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question