Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Pzz's avatar
Level 4

Starting with Laravel, can't get Sail to start

Hi,

I'm trying to get started with Laravel, and I guess "Sail" is a good option. No need to install PHP or any database locally. I've been reading docs and viewing videos, and still can't get any further than this message.

The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: The stream or file "/var/www/html/storage/logs/laravel.log"

All I do is a: curl -s https://laravel.build/project | bash and: cd project && ./vendor/bin/sail up

Just using the default localhost, no different ports. As far as I can see the dockers are doing fine. What I find as solution has to do with chmod 755/777 of "storage'"

It

0 likes
3 replies
LaryAI's avatar
Level 58

The error message you're encountering indicates a permission issue with the storage/logs/laravel.log file. To resolve this, you can try changing the permissions of the storage directory.

Here's how you can do it:

  1. Open your terminal and navigate to the root directory of your Laravel project.
  2. Run the following command to change the permissions of the storage directory:
chmod -R 775 storage

This command will give read, write, and execute permissions to the owner and group, and read and execute permissions to others.

  1. After changing the permissions, try running the ./vendor/bin/sail up command again.

If the issue persists, you can try changing the ownership of the storage directory to the web server user. Assuming you're using Apache, you can use the following command:

chown -R www-data:www-data storage

Replace www-data:www-data with the appropriate user and group if you're using a different web server.

After making these changes, you should be able to start Sail without encountering the permission denied error.

Pzz's avatar
Level 4

@laryai did put me in the right direction I guess. But 755 was not enough: 775 works. I'm not sure of the implications of this 775.... But finally I see the default Laravalpage.

automica's avatar
automica
Best Answer
Level 54

@Pzz limiting file permissions isnt an issue locally as only you have access to your local development environment. I'll happily 777 if need be.

1 like

Please or to participate in this conversation.