X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 10 Aug 2009 15:25:15 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: [1.7] cygwin allows writing to readonly files Message-ID: <20090810132515.GP3204@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-02-20) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 Aug 10 17:19, Alexey Borzenkov wrote: > Hi, > > $ echo foo >test.txt > $ chmod 0444 test.txt > $ echo bar >test.txt > > This succeeds, even though the file is readonly, and permissions don't > allow writing to the file. What's even stranger is that other programs > (i.e. Notepad and other editors) can't write to this file, because > there are no writing permissions on the file. How does cygwin 1.7 > manages to bypass NT permissions in this case? > > Currently this breaks ExtUtils::MakeMaker, because it expects readonly > files not to be writable and test fails. That's a bug in your testsuite. I assume you're running the tests as administrator, right? Administrators have the right to write to all files, even R/O files, according to POSIX rules. Your test would fail on Linux as well, if you're running it as root. 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