diff --git a/tests/stub_sftp.py b/tests/stub_sftp.py index 2eb5f24..dedb78a 100644 --- a/tests/stub_sftp.py +++ b/tests/stub_sftp.py @@ -97,7 +97,9 @@ class StubSFTPServer (SFTPServerInterface): if mode is not None: fd = os.open(path, flags, mode) else: - fd = os.open(path, flags) + # os.open() defaults to 0777 which is + # an odd default mode for files + fd = os.open(path, flags, 0666) except OSError, e: return SFTPServer.convert_errno(e.errno) if (flags & os.O_CREAT) and (attr is not None):