Skip to content

Commit

Permalink
Merge pull request #7834 from ThomasWaldmann/fix-unreadable-dir-clean…
Browse files Browse the repository at this point in the history
…up-master

fix post-test permission issues
  • Loading branch information
ThomasWaldmann committed Sep 20, 2023
2 parents 84fc938 + 2195558 commit a9e625d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/borg/testsuite/archiver/create_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,12 @@ def test_create_unreadable_parent(archiver):
os.mkdir(parent_dir)
os.mkdir(root_dir)
os.chmod(parent_dir, 0o111) # --x--x--x == parent dir traversable, but not readable
cmd(archiver, "rcreate", "--encryption=none")
# issue #7746: we *can* read root_dir and we *can* traverse parent_dir, so this should work:
cmd(archiver, "create", "test", root_dir)
try:
cmd(archiver, "rcreate", "--encryption=none")
# issue #7746: we *can* read root_dir and we *can* traverse parent_dir, so this should work:
cmd(archiver, "create", "test", root_dir)
finally:
os.chmod(parent_dir, 0o771) # otherwise cleanup after this test fails


@pytest.mark.skipif(is_win32, reason="unix sockets not available on windows")
Expand Down

0 comments on commit a9e625d

Please sign in to comment.