{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/22343","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/22343/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/22343/comments","events_url":"https://api.github.com/repos/golang/go/issues/22343/events","html_url":"https://github.com/golang/go/issues/22343","id":267005724,"number":22343,"title":"cmd/go: creates executables with non-standard permissions on NTFS","user":{"login":"steamonimo","id":6920782,"avatar_url":"https://avatars3.githubusercontent.com/u/6920782?v=4","gravatar_id":"","url":"https://api.github.com/users/steamonimo","html_url":"https://github.com/steamonimo","followers_url":"https://api.github.com/users/steamonimo/followers","following_url":"https://api.github.com/users/steamonimo/following{/other_user}","gists_url":"https://api.github.com/users/steamonimo/gists{/gist_id}","starred_url":"https://api.github.com/users/steamonimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steamonimo/subscriptions","organizations_url":"https://api.github.com/users/steamonimo/orgs","repos_url":"https://api.github.com/users/steamonimo/repos","events_url":"https://api.github.com/users/steamonimo/events{/privacy}","received_events_url":"https://api.github.com/users/steamonimo/received_events","type":"User","site_admin":false},"labels":[{"id":373402289,"url":"https://api.github.com/repos/golang/go/labels/NeedsInvestigation","name":"NeedsInvestigation","color":"ededed","default":false},{"id":199753992,"url":"https://api.github.com/repos/golang/go/labels/OS-Windows","name":"OS-Windows","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/56","html_url":"https://github.com/golang/go/milestone/56","labels_url":"https://api.github.com/repos/golang/go/milestones/56/labels","id":2473074,"number":56,"title":"Go1.10","description":"","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":860,"closed_issues":375,"state":"open","created_at":"2017-04-21T19:22:29Z","updated_at":"2017-10-23T21:39:37Z","due_on":"2018-01-31T08:00:00Z","closed_at":null},"comments":6,"created_at":"2017-10-19T22:12:03Z","updated_at":"2017-10-23T22:36:13Z","closed_at":null,"author_association":"NONE","body":"### What version of Go are you using (`go version`)?\r\n1.9.1\r\n\r\n### Does this issue reproduce with the latest release?\r\nyes\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\nWindows 2012 Server R2\r\n\r\n### What did you do?\r\nCompiling source and creating executable\r\n\r\n### What did you expect to see?\r\nAt minimum I expect that the created executable will inherit the rights from the folder it was created in.\r\nIf the executable did exists before then it would be even better to preserve its current NTFS settings (that could be very different from the rest)\r\n\r\n### What did you see instead?\r\nThe created executable is currently breaking the inheritance of NTFS permissions. The resulting executable is restricted to the current user and system. In contrast the standard windows behaviour for newly created files is that the file will always inherit its permissions from its parent folder. With Windows 7 files that are moved will also inherit the permissions of the new target folder. With executables running in different and very restricted user accounts the current behaviour of breaking the inheritance is not helpful. In more general terms not respecting the current NTFS permissions is not recommendable."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/338816857","html_url":"https://github.com/golang/go/issues/22343#issuecomment-338816857","issue_url":"https://api.github.com/repos/golang/go/issues/22343","id":338816857,"user":{"login":"ianlancetaylor","id":3194333,"avatar_url":"https://avatars2.githubusercontent.com/u/3194333?v=4","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"created_at":"2017-10-23T22:36:13Z","updated_at":"2017-10-23T22:36:13Z","author_association":"CONTRIBUTOR","body":"Is there a way that we can whether NTFS permissions apply to the destination directory, comparable to the test of `ModeSetgid` on Unix systems?  Or do these permissions always apply, and we should always copy on Windows?"}}
{"actor":{"display_login":"ianlancetaylor"}}