Browse code

Update s3cmd --configure

If there's a 403 error while testing the config
ask the user if he has ListAllMyBuckets permissions

This is a very common problem out there and it would
be very useful for the starters to be prompted this.
Like a big "aaaah" moment.

Leandro Ostera authored on 2013/10/11 08:43:09
Showing 2 changed files
... ...
@@ -179,6 +179,9 @@ Simple s3cmd HowTo
179 179
    account page. Be careful when copying them! They are 
180 180
    case sensitive and must be entered accurately or you'll 
181 181
    keep getting errors about invalid signatures or similar.
182
+   
183
+   Remember to add ListAllMyBuckets permissions to the keys
184
+   or you will get an AccessDenied error while testing access.
182 185
 
183 186
 3) Run "s3cmd ls" to list all your buckets.
184 187
    As you just started using S3 there are no buckets owned by 
... ...
@@ -1587,6 +1587,8 @@ def run_configure(config_file, args):
1587 1587
 
1588 1588
                 except Exception, e:
1589 1589
                     error(u"Test failed: %s" % (e))
1590
+                    if e.find('403') != -1:
1591
+                        error(u"Are you sure your keys have ListAllMyBuckets permissions?")
1590 1592
                     val = raw_input("\nRetry configuration? [Y/n] ")
1591 1593
                     if val.lower().startswith("y") or val == "":
1592 1594
                         continue