Skip to content

[Filesystem] dumpFile() ignores umask settings #17303

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

Closed
hboomsma opened this issue Jan 8, 2016 · 3 comments
Closed

[Filesystem] dumpFile() ignores umask settings #17303

hboomsma opened this issue Jan 8, 2016 · 3 comments

Comments

@hboomsma
Copy link

hboomsma commented Jan 8, 2016

dumpFile() will always create a file with 0666 permissions if the file system supports these file permissions.

Analog to the behavior of file_put_contents and other file handling functions, one would expect that the umask setting will be taken into account.

@DemonTPx
Copy link
Contributor

I've run into the same problem.

dumpFile uses the tempnam method to generate a temporary filename, which always creates files using mode 0600. See: http://php.net/manual/en/function.tempnam.php

In symfony/filesystem <3.0, this was not a problem, since a $mode parameter was present with the default value of 0666.

@DemonTPx
Copy link
Contributor

Oh, wait a minute... I see that my problem has already been fixed in master (not in 3.0.1). Thanks for that! 👍

@xabbuh
Copy link
Member

xabbuh commented Jan 18, 2016

@DemonTPx Indeed, this was fixed in #17063 which will be included in 3.0.2.

@fabpot fabpot closed this as completed Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants