{"action":"created","issue":{"url":"https://api.github.com/repos/s3tools/s3cmd/issues/829","repository_url":"https://api.github.com/repos/s3tools/s3cmd","labels_url":"https://api.github.com/repos/s3tools/s3cmd/issues/829/labels{/name}","comments_url":"https://api.github.com/repos/s3tools/s3cmd/issues/829/comments","events_url":"https://api.github.com/repos/s3tools/s3cmd/issues/829/events","html_url":"https://github.com/s3tools/s3cmd/issues/829","id":204518610,"number":829,"title":"SignatureDoesNotMatch on files with spaces while trying to sync","user":{"login":"Mehlstaub","id":6238443,"avatar_url":"https://avatars3.githubusercontent.com/u/6238443?v=3","gravatar_id":"","url":"https://api.github.com/users/Mehlstaub","html_url":"https://github.com/Mehlstaub","followers_url":"https://api.github.com/users/Mehlstaub/followers","following_url":"https://api.github.com/users/Mehlstaub/following{/other_user}","gists_url":"https://api.github.com/users/Mehlstaub/gists{/gist_id}","starred_url":"https://api.github.com/users/Mehlstaub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mehlstaub/subscriptions","organizations_url":"https://api.github.com/users/Mehlstaub/orgs","repos_url":"https://api.github.com/users/Mehlstaub/repos","events_url":"https://api.github.com/users/Mehlstaub/events{/privacy}","received_events_url":"https://api.github.com/users/Mehlstaub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-01T07:59:50Z","updated_at":"2017-04-23T06:16:32Z","closed_at":null,"body":"I am trying to sync some files from a local ubuntu 16.04 machine to a s3 bucket. Whenever it tries to upload a file wich has spaces in the filename, the process breaks with 403 signaturedoesnotmatch. \r\n\r\nFiles without spaces in it work just fine. \r\n\r\n\r\n\r\ns3cmd sync --no-check-md5  --delete-removed -r -v /opt/rvcms/data/wcm/ s3://content/\r\nINFO: Compiling list of local files...\r\nINFO: Running stat() and reading/calculating MD5 values on 25241 files, this may take some time...\r\nINFO: [1000/25241]\r\nINFO: [2000/25241]\r\nINFO: [3000/25241]\r\nINFO: [4000/25241]\r\nINFO: [5000/25241]\r\nINFO: [6000/25241]\r\nINFO: [7000/25241]\r\nINFO: [8000/25241]\r\nINFO: [9000/25241]\r\nINFO: [10000/25241]\r\nINFO: [11000/25241]\r\nINFO: [12000/25241]\r\nINFO: [13000/25241]\r\nINFO: [14000/25241]\r\nINFO: [15000/25241]\r\nINFO: [16000/25241]\r\nINFO: [17000/25241]\r\nINFO: [18000/25241]\r\nINFO: [19000/25241]\r\nINFO: [20000/25241]\r\nINFO: [21000/25241]\r\nINFO: [22000/25241]\r\nINFO: [23000/25241]\r\nINFO: [24000/25241]\r\nINFO: [25000/25241]\r\nINFO: Retrieving list of remote files for s3://content/ ...\r\nINFO: Found 25241 local files, 1 remote files\r\nINFO: Verifying attributes...\r\nINFO: Summary: 25241 local files to upload, 0 files to remote copy, 1 remote files to delete\r\ndelete: 's3://content/wcm/mediadata/0000.txt'\r\nupload: '/opt/rvcms/data/wcm/mediadata/0000.txt' -> 's3://content/mediadata/0000.txt'  [1 of 25241]\r\n 5 of 5   100% in    0s    68.00 B/s  done\r\nupload: '/opt/rvcms/data/wcm/mediadata/01 1_new.pdf' -> 's3://content/mediadata/01 1_new.pdf'  [2 of 25241]\r\n 329315 of 329315   100% in    0s     2.91 MB/s  done\r\nERROR: S3 error: 403 (SignatureDoesNotMatch): The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. For more information, see REST Authentication and SOAP Authentication for details."},"comment":{"url":"https://api.github.com/repos/s3tools/s3cmd/issues/comments/296422440","html_url":"https://github.com/s3tools/s3cmd/issues/829#issuecomment-296422440","issue_url":"https://api.github.com/repos/s3tools/s3cmd/issues/829","id":296422440,"user":{"login":"kawaja","id":4766822,"avatar_url":"https://avatars2.githubusercontent.com/u/4766822?v=3","gravatar_id":"","url":"https://api.github.com/users/kawaja","html_url":"https://github.com/kawaja","followers_url":"https://api.github.com/users/kawaja/followers","following_url":"https://api.github.com/users/kawaja/following{/other_user}","gists_url":"https://api.github.com/users/kawaja/gists{/gist_id}","starred_url":"https://api.github.com/users/kawaja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawaja/subscriptions","organizations_url":"https://api.github.com/users/kawaja/orgs","repos_url":"https://api.github.com/users/kawaja/repos","events_url":"https://api.github.com/users/kawaja/events{/privacy}","received_events_url":"https://api.github.com/users/kawaja/received_events","type":"User","site_admin":false},"created_at":"2017-04-23T06:16:32Z","updated_at":"2017-04-23T06:16:32Z","body":"I have the same issue with spaces.  I have determined that the issue started as of commit 267a312e0c85109cfa626a8d323ccdbfe3830db5.\r\n\r\n```\r\nroot@3fe290adab8e:/s3cmd# git checkout 267a312e0c85109cfa626a8d323ccdbfe3830db5\r\nPrevious HEAD position was 2f994be... Remove legacy code. s3cmd is now only compatible py >2.6\r\nHEAD is now at 267a312... Py3 support: Reworked request/signature regarding unicode/bytes mix.\r\nroot@3fe290adab8e:/s3cmd# s3cmd ls \"s3://_bucket_-photos/Misc 2/photo.JPG\"\r\nERROR: S3 error: 403 (SignatureDoesNotMatch): The request signature we calculated does not match the signature you provided. Check your key and signing method.\r\n```\r\nroll back one commit:\r\n```\r\nroot@3fe290adab8e:/s3cmd# git checkout 2f994be2878c8b0aa1263cfd2830d390333d9925\r\nPrevious HEAD position was 267a312... Py3 support: Reworked request/signature regarding unicode/bytes mix.\r\nHEAD is now at 2f994be... Remove legacy code. s3cmd is now only compatible py >2.6\r\nroot@3fe290adab8e:/s3cmd# s3cmd ls \"s3://_bucket_-photos/Misc 2/photo.JPG\"\r\n2014-08-18 04:32    151991   s3://_bucket_-photos/Misc 2/photo.JPG\r\n```\r\n\r\nProbably irrelevant, but after seeing this issue, I generated a new access key and secret key as my old secret key had non-alphanumerics in it and I'd seen some comments about that not working in some circumstances. \r\n\r\nThe difference seems to be that the working request (2f994be2878c8b0aa1263cfd2830d390333d9925) submits the URI: ``/?prefix=Misc+2/photo.JPG&delimiter=/`` and the non-working request (267a312e0c85109cfa626a8d323ccdbfe3830db5) submits the URI: ``/?prefix=Misc%202/photo.JPG&delimiter=/``."}}
{"actor":{"display_login":"kawaja"}}