{"action":"created","issue":{"url":"https://api.github.com/repos/minio/minio/issues/5978","repository_url":"https://api.github.com/repos/minio/minio","labels_url":"https://api.github.com/repos/minio/minio/issues/5978/labels{/name}","comments_url":"https://api.github.com/repos/minio/minio/issues/5978/comments","events_url":"https://api.github.com/repos/minio/minio/issues/5978/events","html_url":"https://github.com/minio/minio/issues/5978","id":326003575,"number":5978,"title":"Upload failure when using '/' in the object key name","user":{"login":"maordavidov","id":14234032,"avatar_url":"https://avatars1.githubusercontent.com/u/14234032?v=4","gravatar_id":"","url":"https://api.github.com/users/maordavidov","html_url":"https://github.com/maordavidov","followers_url":"https://api.github.com/users/maordavidov/followers","following_url":"https://api.github.com/users/maordavidov/following{/other_user}","gists_url":"https://api.github.com/users/maordavidov/gists{/gist_id}","starred_url":"https://api.github.com/users/maordavidov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maordavidov/subscriptions","organizations_url":"https://api.github.com/users/maordavidov/orgs","repos_url":"https://api.github.com/users/maordavidov/repos","events_url":"https://api.github.com/users/maordavidov/events{/privacy}","received_events_url":"https://api.github.com/users/maordavidov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-24T07:52:18Z","updated_at":"2018-05-24T10:10:17Z","closed_at":null,"author_association":"NONE","body":"Consider the following call using AWSSDK .NET Core\r\n```\r\nvar result  = await _s3Client.PutObjectAsync(new PutObjectRequest\r\n            {\r\n                ContentBody = feedFile,\r\n                BucketName = _bucketName,\r\n                Key = \"123/Wul8zNmKHpfkG6uFurdUkEfp5Ho.txt\"\r\n            }, cancelToken);\r\n ```\r\n\r\nThe request fail with Access Denied.\r\n\r\nFiddler response:\r\n`<Error><Code>AccessDenied</Code><Message>Access Denied.</Message><Key></Key><BucketName></BucketName><Resource>/temp1/123/Wul8zNmKHpfkG6uFurdUkEfp5Ho.txt</Resource><RequestId>3L137</RequestId><HostId>3L137</HostId></Error>`\r\n\r\nS3 policy is Read Write *\r\n\r\nWhile replacing '/' with '_' works.\r\n\r\nThe errors from the minio log\r\n```\r\n API: PutObject(bucket=temp1, object=123/Wul8zNmKHpfkG6uFurdUkEfp5Ho.txt)\r\namazon-s3_1  | Time: 07:47:39 UTC 05/24/2018\r\namazon-s3_1  | RemoteHost: 172.26.0.1:48152\r\namazon-s3_1  | UserAgent: aws-sdk-dotnet-coreclr/3.3.18.2 aws-sdk-dotnet-core/3.3.22.1 .NET_Core/4.6.26020.03 OS/Microsoft_Windows_10.0.16299 ClientAsync\r\namazon-s3_1  | Error: file access denied\r\namazon-s3_1  |        1: cmd/fs-v1.go:738:cmd.(*FSObjects).putObject()\r\namazon-s3_1  |        2: cmd/fs-v1.go:692:cmd.(*FSObjects).PutObject()\r\namazon-s3_1  |        3: cmd/object-handlers.go:669:cmd.(ObjectLayer).PutObject-fm()\r\namazon-s3_1  |        4: cmd/object-handlers.go:746:cmd.objectAPIHandlers.PutObjectHandler()\r\namazon-s3_1  |        5: cmd/api-router.go:77:cmd.(objectAPIHandlers).PutObjectHandler-fm()\r\namazon-s3_1  |        6: net/http/server.go:1947:http.HandlerFunc.ServeHTTP()\r\namazon-s3_1  |\r\namazon-s3_1  | API: SYSTEM()\r\namazon-s3_1  | Time: 07:49:14 UTC 05/24/2018\r\namazon-s3_1  | Error: No bucket policy found for bucket: temp1\r\namazon-s3_1  |        1: cmd/web-handlers.go:1163:cmd.toWebAPIError()\r\namazon-s3_1  |        2: cmd/web-handlers.go:1033:cmd.toJSONError()\r\namazon-s3_1  |        3: cmd/web-handlers.go:927:cmd.(*webAPIHandlers).SetBucketPolicy()\r\namazon-s3_1  |        4: reflect/value.go:447:reflect.Value.call()\r\namazon-s3_1  |        5: reflect/value.go:308:reflect.Value.Call()\r\namazon-s3_1  |        6: vendor/github.com/gorilla/rpc/v2/server.go:137:v2.(*Server).ServeHTTP()\r\namazon-s3_1  |        7: vendor/github.com/gorilla/mux/mux.go:107:mux.(*Router).ServeHTTP()\r\namazon-s3_1  |        8: cmd/generic-handlers.go:666:cmd.securityHeaderHandler.ServeHTTP()\r\namazon-s3_1  |        9: cmd/generic-handlers.go:651:cmd.rateLimit.ServeHTTP()\r\namazon-s3_1  |       10: :0:()\r\namazon-s3_1  |       11: cmd/generic-handlers.go:611:cmd.pathValidityHandler.ServeHTTP()\r\namazon-s3_1  |       12: :0:()\r\namazon-s3_1  |       13: cmd/generic-handlers.go:550:cmd.httpStatsHandler.ServeHTTP()\r\namazon-s3_1  |       14: :0:()\r\namazon-s3_1  |       15: cmd/generic-handlers.go:66:cmd.requestSizeLimitHandler.ServeHTTP()\r\namazon-s3_1  |       16: :0:()\r\namazon-s3_1  |       17: cmd/generic-handlers.go:91:cmd.requestHeaderSizeLimitHandler.ServeHTTP()\r\namazon-s3_1  |       18: :0:()\r\namazon-s3_1  |       19: cmd/crossdomain-xml-handler.go:51:cmd.crossDomainPolicy.ServeHTTP()\r\namazon-s3_1  |       20: :0:()\r\namazon-s3_1  |       21: cmd/generic-handlers.go:243:cmd.redirectHandler.ServeHTTP()\r\namazon-s3_1  |       22: :0:()\r\namazon-s3_1  |       23: cmd/generic-handlers.go:301:cmd.minioReservedBucketHandler.ServeHTTP()\r\namazon-s3_1  |       24: :0:()\r\namazon-s3_1  |       25: cmd/generic-handlers.go:270:cmd.cacheControlHandler.ServeHTTP()\r\namazon-s3_1  |       26: :0:()\r\namazon-s3_1  |       27: cmd/generic-handlers.go:371:cmd.timeValidityHandler.ServeHTTP()\r\namazon-s3_1  |       28: :0:()\r\namazon-s3_1  |       29: vendor/github.com/rs/cors/cors.go:190:cors.(*Cors).Handler.func1()\r\namazon-s3_1  |       30: net/http/server.go:1947:http.HandlerFunc.ServeHTTP()\r\n```"},"comment":{"url":"https://api.github.com/repos/minio/minio/issues/comments/391661833","html_url":"https://github.com/minio/minio/issues/5978#issuecomment-391661833","issue_url":"https://api.github.com/repos/minio/minio/issues/5978","id":391661833,"user":{"login":"maordavidov","id":14234032,"avatar_url":"https://avatars1.githubusercontent.com/u/14234032?v=4","gravatar_id":"","url":"https://api.github.com/users/maordavidov","html_url":"https://github.com/maordavidov","followers_url":"https://api.github.com/users/maordavidov/followers","following_url":"https://api.github.com/users/maordavidov/following{/other_user}","gists_url":"https://api.github.com/users/maordavidov/gists{/gist_id}","starred_url":"https://api.github.com/users/maordavidov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maordavidov/subscriptions","organizations_url":"https://api.github.com/users/maordavidov/orgs","repos_url":"https://api.github.com/users/maordavidov/repos","events_url":"https://api.github.com/users/maordavidov/events{/privacy}","received_events_url":"https://api.github.com/users/maordavidov/received_events","type":"User","site_admin":false},"created_at":"2018-05-24T10:10:17Z","updated_at":"2018-05-24T10:10:17Z","author_association":"NONE","body":"I'm running dockerized minio \r\n`minio/minio:RELEASE.2018-05-16T23-35-33Z`\r\n\r\nThose are the environment variables I'm using\r\n```\r\nenvironment:\r\n      MINIO_ACCESS_KEY: kuku\r\n      MINIO_SECRET_KEY: kukuriku\r\n      MINIO_REGION: us-east-1\r\n      MINIO_ENABLE_FSMETA: 1\r\n```\r\n"}}
{"actor":{"display_login":"maordavidov"}}