literalice / gradle-aws-s3-sync

The gradle task for synchronizing a local directory with a AWS S3 bucket.
37 stars 23 forks source link

acl option not working #1

Closed msgilligan closed 11 years ago

msgilligan commented 11 years ago

It seems that the acl option is not working properly. (or I'm doing something wrong.)

My task looks like this:

task deployS3(type: S3Sync) {
    accessKey awsAccessKey
    secretKey awsSecretKey

    configFile "synchronizer.properties"
    acl com.monochromeroad.gradle.plugin.aws.s3.ACL.PublicRead
    force true
    noDelete true

    from "web-app/xx"
    into "yy/xx"
}

It's behaving as if the ACL option is "PRIVATE" rather than "PUBLIC_READ"

literalice commented 11 years ago

Thank you for reporting a issue. I am trying to re-produce the problem, but I can't achieve it yet. Will you check a permission of the s3's bucket or bucket policies again? Or a whole gradle project / a bucket setting that can re-produce the issue might be helpful.

msgilligan commented 11 years ago

I'll try to make a sample project this evening. I should note that by pulling code out of the gradle plugin and using it to make a groovy shell (hashbang) script and making some changes I was able to push with the correct ACL behavior. (That is with no changes on the AWS side required.)

msgilligan commented 11 years ago

OK, so I have a little additional information: it looks like the credentials I was using didn't have permission to set the ACL. I wasn't seeing an error for that, though.

So, a sample project won't help and I don't think there is a bug in the Gradle plugin, but I should probably double-check on what error message (if any) was produced.

msgilligan commented 11 years ago

This was "user error" and I contributed a pull request that adds code to the sample to show how to do this: https://github.com/literalice/gradle-aws-s3-sync/pull/2