From: Tobias Reif Date: 2002-06-17T06:33:25+09:00 Subject: Re: File.new('foo', 0600 , 'wb') Carlos wrote: > So you cannot specify permissions if you use "wb", this parameter is > ignored. If you want to specify permissions, you must use numeric mode. Guy > is suggesting that you do: > > flag = File::CREAT > flag |= File::BINARY if File::Constants.const_defined?("BINARY") > File.new "foo", flag, 0600 I'm not sure if an alternative would be feasible, but I find all this very quirky. I just want save some image data, with permission 0600; the code should be very short and simple, and work on all major OSes. I do not want to write three lines of uppercase double colon mess. Tobi -- http://www.pinkjuice.com/