Sakamoto Kazuma
Sakamoto Kazuma

Reputation: 2579

Laravel Permissions

I did an installation of laravel, and copied the files to a xampp hosted folder on the same machine. When I try to visit my index.php file however, I'm getting the following error:

Error in exception handler: The stream or file "/Applications/XAMPP/xamppfiles/htdocs/TestManagement/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/TestManagement/bootstrap/compiled.php:8969

I'm always a bit hesitant about changing permissions, as I've done some pretty bad chmodding before. Was wondering if there was a rule of thumb or expected behavior for this. Should this be 777 or 755?

Upvotes: 0

Views: 2355

Answers (2)

Frode Saetre
Frode Saetre

Reputation: 32

Always use 777 on app/storage folder

Upvotes: 0

George Cummins
George Cummins

Reputation: 28936

The Laravel and Monolog documentation appear to contain no reference to the 'right' permissions. You can make it work with restrictive permissions, but be aware of all of the users that need access:

  • the web server user
  • cron user (if you run artisan commands via cron)
  • anyone who manually runs artisan commands.

They will each need read/write permissions to the log files.

Upvotes: 2

Related Questions