MIniMagick::Image.write() saves files with varying permissions <p>I am writing a little photo gallery with Rails 3.0.11 and MiniMagick. </p> <pre><code>def JadeImage.rescale path,new_path,max_height=150 image = MiniMagick::Image.open(path) image.adaptive_resize(self.resize(image[:height],max_height))if image[:height] &gt; max_height image.write(new_path) end </code></pre> <p>I am using this to save two resized images from the same photo. One of the files gets saved with 644 permissions and all is right in the world. The other always get saved as 600 and as such can't be displayed in the webpage. </p> <p>For now, after saving them, I run a little utility to set everything in that directory as 644 so it works now.</p> <p>Is there any reason why this would occur?</p>