summaryrefslogtreecommitdiff
path: root/tests/sources/tar.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sources/tar.py')
-rw-r--r--tests/sources/tar.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/sources/tar.py b/tests/sources/tar.py
index f5f3dde2d..acf0a99a5 100644
--- a/tests/sources/tar.py
+++ b/tests/sources/tar.py
@@ -306,7 +306,8 @@ def test_read_only_dir(cli, tmpdir, datafiles, tar_name, base_dir):
# Make tmpdir deletable no matter what happens
def make_dir_writable(_fn, path, _excinfo):
- os.chmod(os.path.dirname(path), 0o777)
+ os.chown(os.path.dirname(path), os.geteuid())
+ os.chmod(os.path.dirname(path), 0o700)
if os.path.isdir(path):
os.rmdir(path)
else: