From af2050cedebdf2db5ac17242dc88d0273cecdbdc Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 5 Feb 2008 01:39:59 +0000 Subject: [PATCH] making umask write out files so that the web server can read them git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@137 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7 --- app/models/image.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/image.rb b/app/models/image.rb index 1d0fed2..0a2b1a9 100644 --- a/app/models/image.rb +++ b/app/models/image.rb @@ -66,6 +66,7 @@ class Image < ActiveRecord::Base # files if applicable. # def setup_directories + File.umask(0022) Dir.mkdir(base_directory) unless File.exist?(base_directory) self.original = File.basename(@file.original_filename).gsub(/[^\w._-]/, '') @magick_image.write("#{base_directory}/#{self.original}")