{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/pub/issues/756","labels_url":"https://api.github.com/repos/dart-lang/pub/issues/756/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/756/comments","events_url":"https://api.github.com/repos/dart-lang/pub/issues/756/events","html_url":"https://github.com/dart-lang/pub/issues/756","id":85644572,"number":756,"title":"`pub get` sets /pub.dartlang.org and /pub.dartlang.org/* chmod 700","user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/pub/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/dart-lang/pub/labels/NotPlanned","name":"NotPlanned","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"munificent","id":46275,"avatar_url":"https://avatars.githubusercontent.com/u/46275?v=3","gravatar_id":"","url":"https://api.github.com/users/munificent","html_url":"https://github.com/munificent","followers_url":"https://api.github.com/users/munificent/followers","following_url":"https://api.github.com/users/munificent/following{/other_user}","gists_url":"https://api.github.com/users/munificent/gists{/gist_id}","starred_url":"https://api.github.com/users/munificent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munificent/subscriptions","organizations_url":"https://api.github.com/users/munificent/orgs","repos_url":"https://api.github.com/users/munificent/repos","events_url":"https://api.github.com/users/munificent/events{/privacy}","received_events_url":"https://api.github.com/users/munificent/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-06-05T22:13:52Z","updated_at":"2015-06-05T22:13:52Z","closed_at":null,"body":"_Originally opened as dart-lang/sdk#15384_\n\n*This issue was originally filed by bangko...&#064;gmail.com*\n_____\n**What steps will reproduce the problem?**\n1. pub get\n\n**What is the expected output? What do you see instead?**\nuse user's default\n\n**What version of the product are you using? On what operating system?**\nUbuntu \n\n**Please provide any additional information below.**\n\nwith the exception of those two directories, all other files use the system default.\n\nin my case, in developer mode, my group name is 'www-data' - the user for both node.js and nginx.  a chmod of 700 prevents web access to any of those files."},"comment":{"url":"https://api.github.com/repos/dart-lang/pub/issues/comments/109457502","html_url":"https://github.com/dart-lang/pub/issues/756#issuecomment-109457502","issue_url":"https://api.github.com/repos/dart-lang/pub/issues/756","id":109457502,"user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T22:13:52Z","updated_at":"2015-06-05T22:13:52Z","body":"<a href=\"https://github.com/skabet\"><img src=\"https://avatars.githubusercontent.com/u/22043?v=3\" align=\"left\" width=\"48\" height=\"48\"hspace=\"10\"></img></a> **Comment by [skabet](https://github.com/skabet)**\n\n----\n\nLooking into this, this is from the definition of mkdtemp on Linux:\n\n&nbsp;&nbsp;\"The directory is then created with permissions 0700.\"\n\nThis is not something optional, and I'm quite positive it's a security decision (other users writing to your temp folders is indeed a secure concern). We'll not override this permission in dart:io for two reasons:\n\n1) We want dart:io to reflect the system as much as possible, plus, we can't to it in a portable way (Windows).\n2) Security concerns.\n\nIf pub needs to enforce some kind of permission, consider the following:\n\n&nbsp;&nbsp;void main() {\n&nbsp;&nbsp;&nbsp;&nbsp;var parent = new Directory('.');\n&nbsp;&nbsp;&nbsp;&nbsp;var parentMode = (parent.statSync().mode & 0xFFF).toRadixString(8);\n&nbsp;&nbsp;&nbsp;&nbsp;var tempDir = parent.createTempSync();\n&nbsp;&nbsp;&nbsp;&nbsp;print(Process.runSync('stat', ['--format=%a (%A)', tempDir.path]).stdout);\n&nbsp;&nbsp;&nbsp;&nbsp;Process.runSync('chmod', [parentMode, tempDir.path]);\n&nbsp;&nbsp;&nbsp;&nbsp;print(Process.runSync('stat', ['--format=%a (%A)', tempDir.path]).stdout);\n&nbsp;&nbsp;&nbsp;&nbsp;tempDir.deleteSync();\n&nbsp;&nbsp;}\n______\n*Removed [Area-IO](../labels/Area-IO) label.*\n*Added [Area-Pub](../labels/Area-Pub), [Triaged](../labels/Triaged) labels.*\n*Changed the title to: \"`pub get` sets /pub.dartlang.org and /pub.dartlang.org/* chmod 700\".*\n"}}