Skip to content

Commit

Permalink
Fixed exports to writable but not owned paths
Browse files Browse the repository at this point in the history
fixes #7829
  • Loading branch information
David Davis committed Nov 13, 2020
1 parent 11d6565 commit 2d3855e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES/7829.bugfix
@@ -0,0 +1,2 @@
Fixed bug where exporter directory existed and was writable but not owned by worker process and thus
not chmod-able.
5 changes: 3 additions & 2 deletions pulpcore/app/tasks/export.py
Expand Up @@ -168,8 +168,9 @@ def pulp_export(the_export):

tarfile_fp = the_export.export_tarfile_path()

os.makedirs(pulp_exporter.path, exist_ok=True)
os.chmod(pulp_exporter.path, 0o775) # let owner and group read and write the directory
path = Path(pulp_exporter.path)
if not path.is_dir():
path.mkdir(mode=0o775, parents=True)

rslts = {}
if the_export.validated_chunk_size:
Expand Down

0 comments on commit 2d3855e

Please sign in to comment.