delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/08/10/12:11:31

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20090810132515.GP3204@calimero.vinschen.de>
References: <e2480c70908100619m906f5dfj794823f22c7604bc AT mail DOT gmail DOT com> <20090810132515 DOT GP3204 AT calimero DOT vinschen DOT de>
Date: Mon, 10 Aug 2009 20:11:12 +0400
Message-ID: <e2480c70908100911j520101cftbaf4dc3eb08b109e@mail.gmail.com>
Subject: Re: [1.7] cygwin allows writing to readonly files
From: Alexey Borzenkov <snaury AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mon, Aug 10, 2009 at 5:25 PM, Corinna
Vinschen<corinna-cygwin AT cygwin DOT com> wrote:
> That's a bug in your testsuite. =C2=A0I assume you're running the tests as
> administrator, right? =C2=A0Administrators have the right to write to all
> files, even R/O files, according to POSIX rules. =C2=A0Your test would fa=
il
> on Linux as well, if you're running it as root.

Well, it's not my testsuite, but yes, I'm running under administrator
account. But it makes me wonder, how does it work? Do you change ACLs
temporarily?

Anyway, it means there is a bug in perl, because on Linux:

root AT kitsu:~# touch test.txt
root AT kitsu:~# chmod 0444 test.txt
root AT kitsu:~# perl -e 'print "writable\n" if -w "test.txt"'
writable

On Cygwin 1.7 perl thinks that the file is not writable.

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019