Tanaka Akira <akr / fsij.org> wrote:
> 2011/11/9 Eric Wong <normalperson / yhbt.net>:
> > I'm not sure if this is a bug or intended as spec.
> >
> > I noticed when a file name argument is passed to the IO.copy_stream, the
> > newly-created destination file has 0600 perms and is not respecting my
> > normal umask (0022).
> 
> Sometimes the convention, 0666 by default, causes security problem:
> It causes world writable files if users forget to set correct umask.

Thank you for your response.

I still prefer 0666 personally, but I respect your/matz's decision
and will remember to chmod :>

Is there a plan to change File.open(path, "w") to be consistent
with IO.copy_stream behavior in Ruby 2.0?