deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Added the laravel default folder storage/framework/cache to writable folders array

Open juliangarcess opened this issue 3 years ago • 3 comments

  • [ ] Bug fix #…?

  • [X] New feature?

  • [ ] BC breaks?

  • [ ] Tests added?

  • [X] Docs added?

    Please, regenerate docs by running next command:
    $ php bin/docgen
    

juliangarcess avatar Sep 14 '22 10:09 juliangarcess

In what situation would omitting this cause an issue? I've never seen this being a problem and I don't think adding this is necessary so I'd love to hear why you think this is needed in the general recipe instead of just for your installation?

You can solve this on your end with a umask https://phoenixnap.com/kb/what-is-umask#:~:text=Linux%20uses%20the%20following%20default,%2Drw%2Dr%2D%2D%20

peterjaap avatar Sep 14 '22 12:09 peterjaap

As storage/framework/cache/data is a default folder of fresh laravel instalation is not affected by umask cause it comes directly from git repository, I think that this folder must be specifically mentioned in writable_dirs array.

In my personal experience I have problems with the recipe until I added that folder to writable array.

juliangarcess avatar Sep 14 '22 12:09 juliangarcess

Curious to hear from more people having problems with this. We've been using this recipe for years and haven't run into this issue yet.

peterjaap avatar Sep 14 '22 12:09 peterjaap

what`s the problem with this PR? why it is not merged??

juliangarcess avatar Oct 25 '22 12:10 juliangarcess

Because @peterjaap doesn't have this issue and the question is, is this a generic problem or one of your deployment

Schrank avatar Oct 25 '22 13:10 Schrank

I think the problem lies here, from your comment;

not affected by umask cause it comes directly from git repository

This folder shouldn't be in any git repository, since it's a cache folder. So I'd advise you to remove it from your git by doing git remote --cached storage/framework/cache. That way, the webserver will create the folder and you won't run into problems.

peterjaap avatar Oct 26 '22 06:10 peterjaap

If you install a fresh laravel aplication that folder came by default, then it must be mentioned on the recipe

juliangarcess avatar Oct 26 '22 20:10 juliangarcess

Ok you convinced me, sorry it took me a while to understand. Merged now!

peterjaap avatar Oct 27 '22 07:10 peterjaap