diff options
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index b8f624e2f..b52d7c2f1 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -553,8 +553,9 @@ fhandler_base::open (int flags, mode_t mode) { file_attributes |= FILE_ATTRIBUTE_NORMAL; - /* If mode has no write bits set, we set the R/O attribute. */ - if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH))) + /* If mode has no write bits set, and ACLs are not used, we set + the DOS R/O attribute. */ + if (!has_acls () && !(mode & (S_IWUSR | S_IWGRP | S_IWOTH))) file_attributes |= FILE_ATTRIBUTE_READONLY; /* If the file should actually be created and has ACLs, |