This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1.7] Admins can write to readonly files

Corinna Vinschen wrote:
On Aug 28 19:57, Christian Franke wrote:
This is not true when 'chmod -w ...' was done before the upgrade to 1.7.
Cygwin 1.5 sets R/O attribute, then open for write fails with permission denied also on 1.7.

That's why 1.7 tries not to set the R/O DOS attribute anymore. But yes, that's not quite consistent. open(2) should open these files for writing as well. Unfortunately this requires to remove the R/O attribute before trying to open the file for writing. There's no atomic way to accomplish this.

Looks like a incomplete implementation of the restore privilege in Windows itself: If the restore privilege overrides a missing write permission in ACL, it should IMO also override the R/O attribute.

I would suggest to add a warning note to the manual that Cygwin 1.7 has root behavior (with backup/restore privileges set) for all users in admin group. That differs probably from what a new user would expect. At least because bash does not start with a '#' prompt even if root is effective:-)


-- Problem reports: FAQ: Documentation: Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]