After setting up S3 - Access denied


(@SenpaiMass) #1

Followed the How: To exactly, after which when i visit S3 i see the bucket been created.

But when i upload an image it says access denied. How do i troubleshoot this issue?


(@SenpaiMass) #2

Here is a screen shot


(Andrew Schleifer) #3

You can get more information from Admin → Logs → Error Logs.


(Bhanu Sharma) #4

Probably incorrect permissions to your AWS access group!


(@SenpaiMass) #5
Message

Job exception: Access Denied

Backtrace

/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.21.2/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-s3-1.14.0/lib/aws-sdk-s3/plugins/sse_cpk.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-s3-1.14.0/lib/aws-sdk-s3/plugins/dualstack.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-s3-1.14.0/lib/aws-sdk-s3/plugins/accelerate.rb:35:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.21.2/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.21.2/lib/aws-sdk-core/plugins/idempotency_token.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.21.2/lib/aws-sdk-core/plugins/param_converter.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.21.2/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.21.2/lib/seahorse/client/plugins/response_target.rb:23:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.21.2/lib/seahorse/client/request.rb:70:in `send_request'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/aws-sdk-s3-1.14.0/lib/aws-sdk-s3/client.rb:4557:in `put_bucket_lifecycle_configuration'
/var/www/discourse/lib/s3_helper.rb:121:in `update_lifecycle'
/var/www/discourse/lib/s3_helper.rb:130:in `update_tombstone_lifecycle'
/var/www/discourse/lib/file_store/s3_store.rb:77:in `purge_tombstone'
/var/www/discourse/app/jobs/scheduled/purge_deleted_uploads.rb:8:in `execute'
/var/www/discourse/app/jobs/base.rb:134:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.5/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/app/jobs/base.rb:129:in `block in perform'
/var/www/discourse/app/jobs/base.rb:125:in `each'
/var/www/discourse/app/jobs/base.rb:125:in `perform'
/var/www/discourse/app/jobs/base.rb:180:in `perform'
/var/www/discourse/lib/scheduler/manager.rb:91:in `process_queue'
/var/www/discourse/lib/scheduler/manager.rb:37:in `block in initialize'

Env
hostname	goodgamer-app
process_id	2224
application_version	6bcdc3ba4b67bb9c33496889e1c2aee6cfff36f0
current_db	default
current_hostname	teh.gg
job	Jobs::PurgeDeletedUploads
problem_db	default
	
opts	


(Andrew Schleifer) #6

That’s not the error from a failing upload; it’s from a background task running on the server. Adding s3:PutLifecycleConfiguration to the permissions will fix that, though.


(Andrew Schleifer) #7

After you add the new permission, what errors are there in the logs?


(@SenpaiMass) #8

When I visit myurl.com/logs there are none, but access denied


(Andrew Schleifer) #9

Check the javascript console for errors.

What’s the full message?


(@SenpaiMass) #10

Has been fixed, followed as per the official thread here again and it worked flawlessly.


(system) #11

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.