Ok so I''m working on a project that stores a number of users details and their associated mailing lists then after all edits writes all the .ali files to a directory. I''m using the following code as a test of file.new (Which I haven''t used before). txtout_file File.new("/export/machinename/htdocs/users/public/mailaliases/all.ali","w+") txtout_file << "Some random text" #write output to the file txtout_file.close #close the file This should write the line "Some random text" to the file all.ali, and it does as long as all.ali already exists. If all.ali is not in the directory it fails with the following error "Permission denied - /export/machinename/htdocs/users/public/mailaliases/all.ali" I was under the impression that the w+ mode would create a file if the file did not exist. The folder permissions are correct as far as I can see and yet I cannot get rails to create the all.ali file. Any ideas? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---