title: Permission denied - /mnt/foo/releases/20130607190757/public/uploads
body: <p>Locally everything works as expected, I use the :file storage and it is working.</p>
  
  <p>But my deployed version uses the :fog storage and it is not working. Everytime that i try to upload a image there I face the following error:</p>
  
  <pre><code>Permission denied - /mnt/foo/releases/20130607190757/public/uploads
  </code></pre>
  
  <p>My uploader configuration is the following:</p>
  
  <pre><code>class ImageUploader &lt; CarrierWave::Uploader::Base
  
    # Include RMagick or MiniMagick support:
    # include CarrierWave::RMagick
    include CarrierWave::MiniMagick
  
    # Override the directory where uploaded files will be stored.
    # This is a sensible default for uploaders that are meant to be mounted:
    def store_dir
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end
  </code></pre>
  
  <p>And my initializer is defined as following:</p>
  
  <pre><code>CarrierWave.configure do |config|
  
    unless Rails.env.test?
      config.fog_credentials = {
        :provider               =&gt; 'AWS',
        :aws_access_key_id      =&gt; ENV['AWS_ACCESS_KEY_ID'],
        :aws_secret_access_key  =&gt; ENV['AWS_SECRET_ACCESS_KEY']
      }
      config.fog_directory = Rails.configuration.fog_directory
      config.fog_public     = false
    end
  
    if Rails.env.test? or Rails.env.cucumber?
      config.enable_processing = false
      config.storage = :file
  
    # We may want to changes storage to 'file' after initial testing
    elsif Rails.env.development?
      config.storage = :file
  
    elsif Rails.env.staging? or Rails.env.pilot? or Rails.env.production?
      config.storage = :fog
    end
  
  end
  </code></pre>
  
  <p>Anyone knows what can be causing that error? It looks like it is storing as a file, since it shows the whole file's path.</p>
  
  <p>Regards</p>