file_put_contents(fixture/bootstrap/cache/services.php) Permission denied
Closed this issue · 3 comments
Hi, I am setting up a jenkins server and I want to run the tests and I got this error becuase some library folders have to be writable.
This is the complete error message:
file_put_contents(/var/lib/jenkins/jobs/crowdfunding-laravel-bridge-DeployToTest/workspace/vendor/orchestra/testbench/src/Traits/../../fixture/bootstrap/cache/services.php): failed to open stream: Permission denied
I have fixed the problem executing a small script before running tests to change folder permissions. I have added other folders which also require writable permission in a Laravel application, I do not know if for this case is not necessary.
This is the script:
https://gist.github.com/josecelano/3d86206c289d88e34811
It may be useful for someone else.
You can submit a PR to the readme to include these info. Not really useful as an issue.
Yes, I was not really sure to post it here, but I thought maybe someone could have the same problem and try to find the solution in issues.
Indeed! It has been useful 4 years later :)
I was looking for a solution to properly define my permissions. It's perfect Thanks!