summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index a44745496b..c808eac06a 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -141,8 +141,10 @@ mode_t unix_mode(int cnum,int dosmode)
result |= (S_IWUSR | S_IWGRP | S_IWOTH);
if (IS_DOS_DIR(dosmode)) {
+ /* We never make directories read only for the owner as under DOS a user
+ can always create a file in a read-only directory. */
result |= (S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH | S_IWUSR);
- result &= (lp_dir_mode(SNUM(cnum)) | 0700);
+ result &= lp_dir_mode(SNUM(cnum));
} else {
if (MAP_ARCHIVE(cnum) && IS_DOS_ARCHIVE(dosmode))
result |= S_IXUSR;