your user cannot write to the file or directory
check your permissions and file ownership
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
sorry, I want to ask, does anyone know why when I type the command php artisan optimize or php artisan config:cache on the hosting server an error appears like the following:
file_put_contents(/usr/share/nginx/html/name_web/bootstrap/cache/config.php): failed to open stream: Permission denied
Thank you for wanting to help
Please or to participate in this conversation.