[1.7] Admins can write to readonly files
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Aug 28 18:38:00 GMT 2009
On Aug 28 19:57, Christian Franke wrote:
> Dave Korn wrote:
>> Christian Franke wrote:
>>
>>> For members of Admin group, Cygwin 1.7 allows to overwrite files without
>>> write permission, but Cygwin 1.5 does not.
>>>
>>
>> You are the root user, this is Unix. Of course you can overwrite files
>> without write permission.
>>
>>
>
> 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.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list