Hi all,

When I call 

file = File.new "somefile.txt",File::CREAT|File::RDWR,0777

Ruby creates a file with permissions rwxr-xr-x (ie 0755) even though I asked for 0777. Is this a bug or security feature and if so how do I turn it off. I need  those permissions for a CGI script I'm writing. Anything else besides those permissions and the webserver returns an Internal Server error. 

file.chmod will not help either. I can open an existing file, again only if it has permission 0777. Would it help if I changed the ownership of the file (it's currently owned by me) to that of the root or webserver? 

I know people use Ruby as a CGI language so there must be ways to solve this. Unfortunately my newbiness to Ruby and CGI is starting to show at this point. Any ideas/answers?

Thanks in advance,
Farrel
-- 
|DNA Research Group		mailto:flifson / cs.uct.ac.za
|Dept. of Computer Science	http://www.cs.uct.ac.za/~flifson
|University of Cape Town	+27-21-650-3799