{"action":"created","issue":{"url":"https://api.github.com/repos/zulip/zulip/issues/4316","repository_url":"https://api.github.com/repos/zulip/zulip","labels_url":"https://api.github.com/repos/zulip/zulip/issues/4316/labels{/name}","comments_url":"https://api.github.com/repos/zulip/zulip/issues/4316/comments","events_url":"https://api.github.com/repos/zulip/zulip/issues/4316/events","html_url":"https://github.com/zulip/zulip/pull/4316","id":217025929,"number":4316,"title":"Set umask 022 before starting prod install.","user":{"login":"feorlen","id":95028,"avatar_url":"https://avatars0.githubusercontent.com/u/95028?v=3","gravatar_id":"","url":"https://api.github.com/users/feorlen","html_url":"https://github.com/feorlen","followers_url":"https://api.github.com/users/feorlen/followers","following_url":"https://api.github.com/users/feorlen/following{/other_user}","gists_url":"https://api.github.com/users/feorlen/gists{/gist_id}","starred_url":"https://api.github.com/users/feorlen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feorlen/subscriptions","organizations_url":"https://api.github.com/users/feorlen/orgs","repos_url":"https://api.github.com/users/feorlen/repos","events_url":"https://api.github.com/users/feorlen/events{/privacy}","received_events_url":"https://api.github.com/users/feorlen/received_events","type":"User","site_admin":false},"labels":[{"id":561830290,"url":"https://api.github.com/repos/zulip/zulip/labels/needs%20review","name":"needs review","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-03-26T04:14:54Z","updated_at":"2017-03-27T21:47:38Z","closed_at":"2017-03-26T07:00:40Z","pull_request":{"url":"https://api.github.com/repos/zulip/zulip/pulls/4316","html_url":"https://github.com/zulip/zulip/pull/4316","diff_url":"https://github.com/zulip/zulip/pull/4316.diff","patch_url":"https://github.com/zulip/zulip/pull/4316.patch"},"body":"Added it after the running as root check but before anything gets started. Local testing looks good and everything installs smoothly now. \r\n\r\n```\r\nroot@minmi:~# ls -ltr /srv\r\ntotal 12\r\ndrwxr-xr-x 3 root  root  4096 Mar 26 03:43 zulip-venv-cache\r\ndrwxr-xr-x 2 zulip zulip 4096 Mar 26 03:44 zulip-npm-cache\r\ndrwxr-xr-x 2 zulip zulip 4096 Mar 26 03:44 zulip-emoji-cache\r\nroot@minmi:~# ls -ltr /srv/zulip-venv-cache/\r\ntotal 4\r\ndrwxr-xr-x 3 root root 4096 Mar 26 03:43 27ae06af0f1e1022553ce4c635e88440c06a6263\r\nroot@minmi:~# umask\r\n0077\r\n```\r\n\r\nFixes #2373"},"comment":{"url":"https://api.github.com/repos/zulip/zulip/issues/comments/289596300","html_url":"https://github.com/zulip/zulip/pull/4316#issuecomment-289596300","issue_url":"https://api.github.com/repos/zulip/zulip/issues/4316","id":289596300,"user":{"login":"feorlen","id":95028,"avatar_url":"https://avatars0.githubusercontent.com/u/95028?v=3","gravatar_id":"","url":"https://api.github.com/users/feorlen","html_url":"https://github.com/feorlen","followers_url":"https://api.github.com/users/feorlen/followers","following_url":"https://api.github.com/users/feorlen/following{/other_user}","gists_url":"https://api.github.com/users/feorlen/gists{/gist_id}","starred_url":"https://api.github.com/users/feorlen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feorlen/subscriptions","organizations_url":"https://api.github.com/users/feorlen/orgs","repos_url":"https://api.github.com/users/feorlen/repos","events_url":"https://api.github.com/users/feorlen/events{/privacy}","received_events_url":"https://api.github.com/users/feorlen/received_events","type":"User","site_admin":false},"created_at":"2017-03-27T21:47:38Z","updated_at":"2017-03-27T21:47:38Z","body":"More notes (I'll be offline for a week and don't have time to finish this today.)\r\n\r\nAdding a preexec_fn call to umask directly in the args to `subprocess.check_call` in `upgrade-zulip` works, and on my Ubuntu system it's inherited by everything `upgrade-zulip-stage-2` calls. (Could that be platform dependent?) \r\n```\r\nsubprocess.check_call([os.path.abspath(\"./scripts/lib/upgrade-zulip-stage-2\"), deploy_path], preexec_fn=os.umask(022))\r\n```\r\n\r\nBut then mypy has a problem with it\r\n```\r\nscripts/lib/upgrade-zulip:53: error: Argument 2 to \"check_call\" has incompatible type \"int\"; expected Callable[[], Any]\r\n```\r\n\r\nI guess that means making it a function, as in how `su_to_zulip` is done."}}
{"actor":{"display_login":"feorlen"}}