{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/80070558","id":80070558,"diff_hunk":"@@ -129,6 +130,12 @@ func (cli *Client) sendClientRequest(ctx context.Context, method, path string, q\n \t\t\treturn serverResp, err\n \t\t}\n \n+\t\tif err, ok := err.(*net.OpError); ok {\n+\t\t\tif os.IsPermission(err.Err) {\n+\t\t\t\treturn ServerResp, ErrPermissionDenied","path":"client/request.go","position":14,"original_position":14,"commit_id":"b265e7994769241f3eaa0962dd4391fcc11a345d","original_commit_id":"b265e7994769241f3eaa0962dd4391fcc11a345d","user":{"login":"srodman7689","id":1052177,"avatar_url":"https://avatars.githubusercontent.com/u/1052177?v=3","gravatar_id":"","url":"https://api.github.com/users/srodman7689","html_url":"https://github.com/srodman7689","followers_url":"https://api.github.com/users/srodman7689/followers","following_url":"https://api.github.com/users/srodman7689/following{/other_user}","gists_url":"https://api.github.com/users/srodman7689/gists{/gist_id}","starred_url":"https://api.github.com/users/srodman7689/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srodman7689/subscriptions","organizations_url":"https://api.github.com/users/srodman7689/orgs","repos_url":"https://api.github.com/users/srodman7689/repos","events_url":"https://api.github.com/users/srodman7689/events{/privacy}","received_events_url":"https://api.github.com/users/srodman7689/received_events","type":"User","site_admin":false},"body":"I will look into this too.","created_at":"2016-09-22T15:39:48Z","updated_at":"2016-09-22T15:39:48Z","html_url":"https://github.com/docker/docker/pull/26797#discussion_r80070558","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/26797","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/80070558"},"html":{"href":"https://github.com/docker/docker/pull/26797#discussion_r80070558"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/26797"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/26797","id":86241395,"html_url":"https://github.com/docker/docker/pull/26797","diff_url":"https://github.com/docker/docker/pull/26797.diff","patch_url":"https://github.com/docker/docker/pull/26797.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/26797","number":26797,"state":"open","locked":false,"title":"Closes #26761 Updated the client/request.go sendClientRequest method to return a Pe…","user":{"login":"srodman7689","id":1052177,"avatar_url":"https://avatars.githubusercontent.com/u/1052177?v=3","gravatar_id":"","url":"https://api.github.com/users/srodman7689","html_url":"https://github.com/srodman7689","followers_url":"https://api.github.com/users/srodman7689/followers","following_url":"https://api.github.com/users/srodman7689/following{/other_user}","gists_url":"https://api.github.com/users/srodman7689/gists{/gist_id}","starred_url":"https://api.github.com/users/srodman7689/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srodman7689/subscriptions","organizations_url":"https://api.github.com/users/srodman7689/orgs","repos_url":"https://api.github.com/users/srodman7689/repos","events_url":"https://api.github.com/users/srodman7689/events{/privacy}","received_events_url":"https://api.github.com/users/srodman7689/received_events","type":"User","site_admin":false},"body":"<!--\r\nPlease make sure you've read and understood our contributing guidelines;\r\nhttps://github.com/docker/docker/blob/master/CONTRIBUTING.md\r\n\r\n** Make sure all your commits include a signature generated with `git commit -s` **\r\n\r\nFor additional information on our contributing process, read our contributing\r\nguide https://docs.docker.com/opensource/code/\r\n\r\nIf this is a bug fix, make sure your description includes \"fixes #xxxx\", or\r\n\"closes #xxxx\"\r\n\r\nPlease provide the following information:\r\n-->\r\n\r\n**- What I did**\r\nI added a new error message for when a user tries to connect with the docker client to the docker daemon via a unix socket and does not have permissions to the socket.\r\n**- How I did it**\r\nby checking if the returned error message string contains connect: permission denied and return the error created by the client.PermissionDenied function. \r\n**- How to verify it**\r\nrun the docker daemon as root, then create a non privileged user and run docker ps -a with that user. you should see the new error message.\r\n\r\n**- Description for the changelog**\r\n<!--\r\nWrite a short (one line) summary that describes the changes in this\r\npull request for inclusion in the changelog:\r\n-->\r\nAdds a more informative error message when a user does not have permissions to connect on the unix socket.\r\n\r\n**- A picture of a cute animal (not mandatory but encouraged)**\r\n\r\n![](http://4.bp.blogspot.com/-IeP5DIkKV2I/UCdKaTD0bOI/AAAAAAAAWqs/cZX_IqOwXzI/s320/funny+Cute+Animal+Pics+(36).jpg)\r\n\r\n\r\nUpdated the client/request.go sendClientRequest method to return a PermissionDenied error if the connection failed due to permissions.\r\n\r\nSigned-off-by: Sean Rodman <srodman7689@gmail.com>","created_at":"2016-09-21T21:06:20Z","updated_at":"2016-09-22T15:39:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24bb6964575f6b7d36c8a7b9816713ed2956bf86","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/26797/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/26797/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/26797/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/b265e7994769241f3eaa0962dd4391fcc11a345d","head":{"label":"srodman7689:friendly_error_on_permissions_connection_error","ref":"friendly_error_on_permissions_connection_error","sha":"b265e7994769241f3eaa0962dd4391fcc11a345d","user":{"login":"srodman7689","id":1052177,"avatar_url":"https://avatars.githubusercontent.com/u/1052177?v=3","gravatar_id":"","url":"https://api.github.com/users/srodman7689","html_url":"https://github.com/srodman7689","followers_url":"https://api.github.com/users/srodman7689/followers","following_url":"https://api.github.com/users/srodman7689/following{/other_user}","gists_url":"https://api.github.com/users/srodman7689/gists{/gist_id}","starred_url":"https://api.github.com/users/srodman7689/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srodman7689/subscriptions","organizations_url":"https://api.github.com/users/srodman7689/orgs","repos_url":"https://api.github.com/users/srodman7689/repos","events_url":"https://api.github.com/users/srodman7689/events{/privacy}","received_events_url":"https://api.github.com/users/srodman7689/received_events","type":"User","site_admin":false},"repo":{"id":68160982,"name":"docker","full_name":"srodman7689/docker","owner":{"login":"srodman7689","id":1052177,"avatar_url":"https://avatars.githubusercontent.com/u/1052177?v=3","gravatar_id":"","url":"https://api.github.com/users/srodman7689","html_url":"https://github.com/srodman7689","followers_url":"https://api.github.com/users/srodman7689/followers","following_url":"https://api.github.com/users/srodman7689/following{/other_user}","gists_url":"https://api.github.com/users/srodman7689/gists{/gist_id}","starred_url":"https://api.github.com/users/srodman7689/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srodman7689/subscriptions","organizations_url":"https://api.github.com/users/srodman7689/orgs","repos_url":"https://api.github.com/users/srodman7689/repos","events_url":"https://api.github.com/users/srodman7689/events{/privacy}","received_events_url":"https://api.github.com/users/srodman7689/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srodman7689/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/srodman7689/docker","forks_url":"https://api.github.com/repos/srodman7689/docker/forks","keys_url":"https://api.github.com/repos/srodman7689/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srodman7689/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srodman7689/docker/teams","hooks_url":"https://api.github.com/repos/srodman7689/docker/hooks","issue_events_url":"https://api.github.com/repos/srodman7689/docker/issues/events{/number}","events_url":"https://api.github.com/repos/srodman7689/docker/events","assignees_url":"https://api.github.com/repos/srodman7689/docker/assignees{/user}","branches_url":"https://api.github.com/repos/srodman7689/docker/branches{/branch}","tags_url":"https://api.github.com/repos/srodman7689/docker/tags","blobs_url":"https://api.github.com/repos/srodman7689/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srodman7689/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srodman7689/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/srodman7689/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srodman7689/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/srodman7689/docker/languages","stargazers_url":"https://api.github.com/repos/srodman7689/docker/stargazers","contributors_url":"https://api.github.com/repos/srodman7689/docker/contributors","subscribers_url":"https://api.github.com/repos/srodman7689/docker/subscribers","subscription_url":"https://api.github.com/repos/srodman7689/docker/subscription","commits_url":"https://api.github.com/repos/srodman7689/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/srodman7689/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/srodman7689/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/srodman7689/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/srodman7689/docker/contents/{+path}","compare_url":"https://api.github.com/repos/srodman7689/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srodman7689/docker/merges","archive_url":"https://api.github.com/repos/srodman7689/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srodman7689/docker/downloads","issues_url":"https://api.github.com/repos/srodman7689/docker/issues{/number}","pulls_url":"https://api.github.com/repos/srodman7689/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/srodman7689/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/srodman7689/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srodman7689/docker/labels{/name}","releases_url":"https://api.github.com/repos/srodman7689/docker/releases{/id}","deployments_url":"https://api.github.com/repos/srodman7689/docker/deployments","created_at":"2016-09-14T01:12:06Z","updated_at":"2016-09-14T01:12:23Z","pushed_at":"2016-09-22T15:20:14Z","git_url":"git://github.com/srodman7689/docker.git","ssh_url":"git@github.com:srodman7689/docker.git","clone_url":"https://github.com/srodman7689/docker.git","svn_url":"https://github.com/srodman7689/docker","homepage":"http://www.docker.com","size":103390,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"2526ae37e98936451dcfb47b76bc851b9fabfb4a","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","deployments_url":"https://api.github.com/repos/docker/docker/deployments","created_at":"2013-01-18T18:10:57Z","updated_at":"2016-09-22T15:37:01Z","pushed_at":"2016-09-22T15:20:15Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":210500,"stargazers_count":35215,"watchers_count":35215,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10363,"mirror_url":null,"open_issues_count":1964,"forks":10363,"open_issues":1964,"watchers":35215,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/26797"},"html":{"href":"https://github.com/docker/docker/pull/26797"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/26797"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/26797/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/26797/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/26797/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/b265e7994769241f3eaa0962dd4391fcc11a345d"}}}}
{"actor":{"display_login":"srodman7689"}}