fix permissions on initial install

running installer as root allows some file ownership from the archive to be set as a user other than root
This commit is contained in:
Min RK
2018-07-19 00:02:15 -07:00
parent 680206813f
commit bcf31a979c
2 changed files with 18 additions and 7 deletions

View File

@@ -76,6 +76,13 @@ def install_miniconda(installer_path, prefix):
'-u', '-b',
'-p', prefix
], stderr=subprocess.STDOUT)
# fix permissions on initial install
# a few files have the wrong ownership and permissions initially
# when the installer is run as root
subprocess.check_call(
["chown", "-R", "{}:{}".format(os.getuid(), os.getgid()), prefix]
)
subprocess.check_call(["chmod", "-R", "o-w", prefix])
def pip_install(prefix, packages, editable=False):