diff --git a/diskcache/core.py b/diskcache/core.py index 7a3d23b..6c9e282 100644 --- a/diskcache/core.py +++ b/diskcache/core.py @@ -232,7 +232,7 @@ def _write(self, full_path, iterator, mode, encoding=None): for count in range(1, 11): with cl.suppress(OSError): - os.makedirs(full_dir) + os.makedirs(full_dir, 0o700) try: # Another cache may have deleted the directory before @@ -444,7 +444,7 @@ def __init__(self, directory=None, timeout=60, disk=Disk, **settings): if not op.isdir(directory): try: - os.makedirs(directory, 0o755) + os.makedirs(directory, 0o700) except OSError as error: if error.errno != errno.EEXIST: raise EnvironmentError(