S3Sync.net

General Category => Questions => Topic started by: A.Skwar on August 17, 2007, 07:23:14 AM



Title: Cannot send: 403 Forbidden
Post by: A.Skwar on August 17, 2007, 07:23:14 AM
Hi.

I'm trying to use s3sync v1.1.4 on a Gentoo Linux machine with ruby 1.8.6 (2007-06-07 patchlevel 36) [i686-linux]. I downloaded http://mirbsd.mirsolutions.de/cvs.cgi/src/etc/ssl.certs.shar and unpacked that in ~/Source/s3sync/certs, by cd'ing to that directory and executing the shar file. s3sync is in ~/Source/s3sync/s3sync. Then I ran:

Code:
cd ~/Source/s3sync/s3sync
AWS_ACCESS_KEY_ID=0C5GNE1××××7Y9SRJ5G2 AWS_SECRET_ACCESS_KEY=ETUqgOouvw××××××2HhLv9UubV0BEq5k5M9lJo9t SSL_CERT_DIR=/home/askwar/Source/s3sync/certs ruby s3sync.rb -r --ssl --delete -v /home/askwar/Source/s3sync/ mybucket:/remotefolder
S3 command failed:
list_bucket mybucket max-keys 200 prefix /remotefolder delimiter /
With result 403 Forbidden
S3 ERROR: #<Net::HTTPForbidden:0xb787df18>
s3sync.rb:292:in `+': can't convert nil into Array (TypeError)
        from s3sync.rb:292:in `s3TreeRecurse'
        from s3sync.rb:348:in `main'
        from ./thread_generator.rb:79:in `call'
        from ./thread_generator.rb:79:in `initialize'
        from ./thread_generator.rb:76:in `new'
        from ./thread_generator.rb:76:in `initialize'
        from s3sync.rb:269:in `new'
        from s3sync.rb:269:in `main'
        from s3sync.rb:708

Any ideas about why it failed like this?

Thanks a lot,
Alexander


Title: Re: Cannot send: 403 Forbidden
Post by: ferrix on August 17, 2007, 09:54:58 PM
Forbidden means what it says; suspect your AWS credentials are not being set/read properly or something similar.


Title: Re: Cannot send: 403 Forbidden
Post by: A.Skwar on August 18, 2007, 04:40:55 AM
Okay. And how can that happen? Why is s3sync.rb not getting the credentials? is s3sync not compatible with the version of ruby that I'm using?


Title: Re: Cannot send: 403 Forbidden
Post by: ferrix on August 18, 2007, 04:22:01 PM
I can't extract any more info from that error than what I said in the other post.  The ruby version requirements are in the README.  I'm not trying to be obstinate, I just don't know how else to help.


Title: Re: Cannot send: 403 Forbidden
Post by: jes5199 on August 19, 2007, 09:51:07 PM
I'm getting the same symptoms, and weirdly, s3cmd.rb works correctly and can list files, but I get 403 forbidden when trying to use s3sync.rb


Title: Re: Cannot send: 403 Forbidden
Post by: jes5199 on August 19, 2007, 10:36:46 PM
wait, I got it, I was using the invalid bucket name "bucket". silly me.


Title: Re: Cannot send: 403 Forbidden
Post by: A.Skwar on August 21, 2007, 05:46:58 AM
I'm getting the same symptoms, and weirdly, s3cmd.rb works correctly and can list files, but I get 403 forbidden when trying to use s3sync.rb

Exactly. With s3cmd, I can do "listbuckets" and other commands just fine:

Code:
$ AWS_ACCESS_KEY_ID=0C5GNE1××××7Y9SRJ5G2 AWS_SECRET_ACCESS_KEY=ETUqgOouvw××××××2HhLv9UubV0BEq5k5M9lJo9t ./s3cmd.rb listbuckets
fooas
sicherung

Or is it, that the Bucketname "mybucket" and/or foldername "/remotefolder" are no good?

Thanks,
Alexander