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

ktare23's avatar

Error while installing Laravel DebugBar

Hello guys how to fix this error? while installing laravel debugbar using this command composer require barryvdh/laravel-debugbar --dev

I got this error file_put_contents(C:\ProgramData\ComposerSetup\bin): Failed to open stream: Permission denied

I'm using a windows OS right now.

0 likes
4 replies
PapaRascal2020's avatar

Hi,

I am not a windows user (anymore) but a friend of mine had a similar challenge. These were the steps he used to resolve it:

In command prompt/terminal (depending on windows version) and inside the project folder run the following commands:

  • php artisan cache:clear
  • chmod -R 775 storage
  • chmod -R 775 vendor
  • composer dump-autoload

Hopefully this works for you 😊If not I will see if I can find the answer for you.

1 like
ktare23's avatar

@PapaRascal2020 hi again sir I thought I resolve this issue in my PC but right now I'm having this problem again and I try to use your advice but when I use these command chmod -R 775 storage chmod -R 775 vendor it says 'chmod' is not recognized as an internal or external command, operable program or batch file.

PapaRascal2020's avatar

@ktare23 You can try these commands in the project folder on command prompt:

icacls storage /grant:r *:(OI)(CI)RX /t

icacls vendor /grant:r *:(OI)(CI)RX /t

Please or to participate in this conversation.