CarrierWave S3 Permission denied error trying to read from tmp

Using CarrierWave and Amazon S3. CarrierWave Configuration:

CarrierWave.configure do |config| config.ensure_multipart_form = false config.permissions = 0777 config.s3_access_key_id = 'secret_access_key_id' config.s3_secret_access_key = 'secret_access_key' config.s3_bucket = 'backet_name' end 

I get a resolved error trying to read from the tmp directory when booting to s3.

 Errno::EACCES Permission denied - D:/MyDirectory/public/uploads/tmp/20110211-1021-3252-6545/my_file.txt. 

What's wrong?

+4
source share
1 answer

I had a problem with Heroku, and I solved it by changing the cache directory in the bootloader.

 def cache_dir "#{Rails.root}/tmp/uploads" end 
+8
source

Source: https://habr.com/ru/post/1339310/


All Articles