It turns out a client can send an NTCreateX call for a new file, but specify FILE_ATTRIBUTE_DIRECTORY in the attribute list. Windows silently strips this, but we don't - causing the unix_mode() function to go through the "mode bits for new directory" codepath, instead of the "mode bits for new file" codepath.
Patch for 3.5.x to follow.
Created attachment 6017 [details]
git am fix for 3.5.next.
Volker please review then assign to Karolin for inclusion.
This is included in the ACL jumbo patch attached to #7716.
*** This bug has been marked as a duplicate of bug 7716 ***