From 7ed0ab8c4aa11ca63b317e6b72867d885a06b210 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 28 Jun 2016 12:02:53 -0700 Subject: [PATCH] Ensure Zulip virtualenvs are world-readable. This is important for both ensuring the Nagios checks work correctly in production, as well as making sure the `zulip` user can access the virtualenv (owned by the `travis` user) in Travis CI. --- scripts/lib/setup_venv.py | 1 + tools/travis/setup-production | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/scripts/lib/setup_venv.py b/scripts/lib/setup_venv.py index 049d03e932..787be92315 100644 --- a/scripts/lib/setup_venv.py +++ b/scripts/lib/setup_venv.py @@ -68,3 +68,4 @@ def do_setup_virtualenv(venv_path, requirements_file, virtualenv_args): run(["pip", "install", "--upgrade", "pip"]) run(["pip", "install", "--no-deps", "--requirement", requirements_file]) + run(["sudo", "chmod", "-R", "a+rX", venv_path]) diff --git a/tools/travis/setup-production b/tools/travis/setup-production index a552c313c7..0af65e540e 100755 --- a/tools/travis/setup-production +++ b/tools/travis/setup-production @@ -2,6 +2,10 @@ set -e set -x +# Make /home/travis world-readable so the `zulip` user will be able to +# read it. +sudo chmod a+rX /home/travis + # Uninstall the unnecessary extra versions of postgres that Travis CI # installs since if we don't do this, doing apt upgrades can fail due # to conflicts over which version of postgres should be running.