-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.1.0: Wrong file permissions #131
Comments
You should try to avoid this ! 😉 But yeah, it's bug. |
@nilshoerrmann it seems like it never did... Or I just can't find where it did. Can you confirm that it's a regression ? |
No, I can't confirm that. |
Ok! And what was the permission on the cache folder ? |
Is the user running the php script owner of the folder ? |
The folder was set to |
So I guess you apache umask must be 133 or something like it. I my setups, all folder and file are own by the php process and 644 is what I want ;) I guess that it's only because we do not use Symphony's writeFile function (we use GD to save image on disk) but a chmod operation could be made. |
@nilshoerrmann would you happen to know why the default value for the |
What do you mean by default value? Is there some default in the code that gets overriden by the Symphony configuration? |
I don't understand the question, sorry. |
The default value for the parameter in the function. It's never used in the core (we always set a value on the call site). |
I just guess it is there because otherwise the process would break (if no param is set when calling it). One might as well throw an exception instead… But is this more useful? |
I would just set the default value to 0644, like we did in writeFile... |
Default permissions of 0777 are pretty dangerous, generally. So I agree, unless @brendo knows why it was done this way. |
Indeed! |
Since we never had any return from @brendo I So I went ahead with changing the default to |
0777 is a dangerous settings and should try to be avoided as a default value. Re: symphonycms/jit_image_manipulation#131
Cache file should be treated like any other files in Symphony: so we need to set the proper rights on them after creation. Fixe #131
@nilshoerrmann can you confirm that b5584e0 fixes your problems (i.e. the |
I'll check that out later today. |
Perf, thanks! |
It works as advertised. |
Awesome! |
0777 is a dangerous settings and should try to be avoided as a default value. Re: symphonycms/jit_image_manipulation#131
0777 is a dangerous settings and should try to be avoided as a default value. Re: symphonycms/jit_image_manipulation#131 Picked from 255b6dd
0777 is a dangerous settings and should try to be avoided as a default value. Re: symphonycms/jit_image_manipulation#131 Picked from 255b6dd
Using the
integration
branch of this extension, it seems that the cached image files don't respect thewrite_mode
settings from the Symphony config.Example: Even if I set
write_mode
to0777
the resulting image will be saved with0644
.The text was updated successfully, but these errors were encountered: