{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-java/issues/780","repository_url":"https://api.github.com/repos/aws/aws-sdk-java","labels_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/780/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/780/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/780/events","html_url":"https://github.com/aws/aws-sdk-java/issues/780","id":165963234,"number":780,"title":"CannedAccessControlList.PublicReadWrite applicable to S3Object?","user":{"login":"tomlee","id":227776,"avatar_url":"https://avatars.githubusercontent.com/u/227776?v=3","gravatar_id":"","url":"https://api.github.com/users/tomlee","html_url":"https://github.com/tomlee","followers_url":"https://api.github.com/users/tomlee/followers","following_url":"https://api.github.com/users/tomlee/following{/other_user}","gists_url":"https://api.github.com/users/tomlee/gists{/gist_id}","starred_url":"https://api.github.com/users/tomlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomlee/subscriptions","organizations_url":"https://api.github.com/users/tomlee/orgs","repos_url":"https://api.github.com/users/tomlee/repos","events_url":"https://api.github.com/users/tomlee/events{/privacy}","received_events_url":"https://api.github.com/users/tomlee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"shorea","id":11096681,"avatar_url":"https://avatars.githubusercontent.com/u/11096681?v=3","gravatar_id":"","url":"https://api.github.com/users/shorea","html_url":"https://github.com/shorea","followers_url":"https://api.github.com/users/shorea/followers","following_url":"https://api.github.com/users/shorea/following{/other_user}","gists_url":"https://api.github.com/users/shorea/gists{/gist_id}","starred_url":"https://api.github.com/users/shorea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shorea/subscriptions","organizations_url":"https://api.github.com/users/shorea/orgs","repos_url":"https://api.github.com/users/shorea/repos","events_url":"https://api.github.com/users/shorea/events{/privacy}","received_events_url":"https://api.github.com/users/shorea/received_events","type":"User","site_admin":false},"assignees":[{"login":"shorea","id":11096681,"avatar_url":"https://avatars.githubusercontent.com/u/11096681?v=3","gravatar_id":"","url":"https://api.github.com/users/shorea","html_url":"https://github.com/shorea","followers_url":"https://api.github.com/users/shorea/followers","following_url":"https://api.github.com/users/shorea/following{/other_user}","gists_url":"https://api.github.com/users/shorea/gists{/gist_id}","starred_url":"https://api.github.com/users/shorea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shorea/subscriptions","organizations_url":"https://api.github.com/users/shorea/orgs","repos_url":"https://api.github.com/users/shorea/repos","events_url":"https://api.github.com/users/shorea/events{/privacy}","received_events_url":"https://api.github.com/users/shorea/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-07-17T06:27:14Z","updated_at":"2016-07-19T16:48:47Z","closed_at":null,"body":"Hello,\r\n\r\nI have set the S3 object ACL with the `CannedAccessControlList.PublicReadWrite` permission to an existing S3 object with the `AmazonS3Client.setObjectAcl` method and the `SetObjectAclRequest` object. Then, I did an anonymous HTTP post to replace the object. However, I got an access denied response. Is the public-read-write permission applicable to an S3 object? BTW, the same HTTP post request can replace the object when I have given the `CannedAccessControlList.PublicReadWrite` permission to the object's bucket.\r\n\r\nHowever, the documentation at http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html says the `CannedAccessControlList.PublicReadWrite` permission is applicable to an S3 object. What does it mean?\r\n\r\nThanks for your advice.\r\n\r\nThomas\r\n\r\nMy HTTP post request:\r\n\r\n```\r\nPOST / HTTP/1.1\r\nHost: somebucket.s3.amazonaws.com\r\nCache-Control: no-cache\r\nContent-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu1fW\r\n\r\n----WebKitFormBoundary7MA4YWxkTrZu1fW\r\nContent-Disposition: form-data; name=\"key\"\r\n\r\nhello.txt\r\n----WebKitFormBoundary7MA4YWxkTrZu1fW\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\nhello world!\r\n----WebKitFormBoundary7MA4YWxkTrZu1fW\r\n```\r\n\r\nThe HTTP response I got:\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<Error>\r\n    <Code>AccessDenied</Code>\r\n    <Message>Access Denied</Message>\r\n    <RequestId>B29BB5D91A11F24C</RequestId>\r\n    <HostId>+3qHADxaz7GUGajmEKxXooonkj7v3vLmNgN1u3DcveiVz+w/aBGRy9h53rFgZcbP/DCrHtobgUA=</HostId>\r\n</Error>\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-java/issues/comments/233694887","html_url":"https://github.com/aws/aws-sdk-java/issues/780#issuecomment-233694887","issue_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/780","id":233694887,"user":{"login":"tomlee","id":227776,"avatar_url":"https://avatars.githubusercontent.com/u/227776?v=3","gravatar_id":"","url":"https://api.github.com/users/tomlee","html_url":"https://github.com/tomlee","followers_url":"https://api.github.com/users/tomlee/followers","following_url":"https://api.github.com/users/tomlee/following{/other_user}","gists_url":"https://api.github.com/users/tomlee/gists{/gist_id}","starred_url":"https://api.github.com/users/tomlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomlee/subscriptions","organizations_url":"https://api.github.com/users/tomlee/orgs","repos_url":"https://api.github.com/users/tomlee/repos","events_url":"https://api.github.com/users/tomlee/events{/privacy}","received_events_url":"https://api.github.com/users/tomlee/received_events","type":"User","site_admin":false},"created_at":"2016-07-19T16:48:47Z","updated_at":"2016-07-19T16:48:47Z","body":"Thanks alot. I have checked that it's okay to `putObject` when I set the bucket to `PublicReadWrite`. However, in that case, I can upload whatever objects into that bucket.\r\n\r\nIs it possible to make a particular object `PublicReadWrite` without making the whole bucket `PublicReadWrite`?"}}
{"actor":{"display_login":"tomlee"}}