Skip to content

Commit

Permalink
Allow setting setgid to fail when making directories (conda#8666)
Browse files Browse the repository at this point in the history
Allow setting setgid to fail when making directories
  • Loading branch information
msarahan authored May 14, 2019
2 parents 810581d + 760bb05 commit ca5b45b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion conda/gateways/disk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,9 @@ def mkdir_p_sudo_safe(path):
if not on_win:
# set newly-created directory permissions to 02775
# https://github.com/conda/conda/issues/6610#issuecomment-354478489
os.chmod(path, 0o2775)
try:
os.chmod(path, 0o2775)
except (OSError, IOError):
log.trace("Failed to set permissions to 2775 on %s (%d %d)",
path, e.errno, errorcode[e.errno])
pass

0 comments on commit ca5b45b

Please sign in to comment.