Issue #5731: Fix win32 directory permission issue