summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tests/stub_sftp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/stub_sftp.py b/tests/stub_sftp.py
index 2eb5f241..dedb78ac 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):