Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Mon, 2 May 2005 16:02:33 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: 1.5.16-1: chmod problem Message-ID: <20050502140233.GH8522@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.4.2i On May 2 07:41, Pach Roman (GS-EC/ESA4) * wrote: > Hello, > I have tried now using strace. > The file strace.14 has been generated for cygwin-1.5.14-1, and strace.15 for cygwin-1.5.15-1. > > The command used was: > > strace chmod +w /u/tmp/yahoo > /tmp/strace.15 2>&1 > > The concerned part from strace.14: > ... > 3310 116505 [main] chmod 1448 set_process_privilege: 0 = set_process_privilege (SeRestorePrivilege, 1) > 244 116749 [main] chmod 1448 set_file_attribute: 0 = set_file_attribute (u:\tmp\yahoo, -1, -1, 0x124) > 10376 127125 [main] chmod 1448 chmod: 0 = chmod (/u/tmp/yahoo, 0x124) > 699 127824 [main] chmod 1448 chdir: dir '/c' > ... > > And the same from strace.15 > ... > 199 5004896 [main] chmod 1436 fhandler_base::open: (u:\tmp\yahoo, 0x110000) > 1441 5006337 [main] chmod 1436 seterrno_from_win_error: /netrel/src/cygwin-1.5.15-1/winsup/cygwin/fhandler.cc:668 windows error 5 > 216 5006553 [main] chmod 1436 geterrno_from_win_error: windows error 5 == errno 13 > 186 5006739 [main] chmod 1436 fhandler_base::open: C0000022 = NtCreateFile (0x0, E0100, u:\tmp\yahoo, io, NULL, 0, 7, 1, 4400, NULL, 0) > 187 5006926 [main] chmod 1436 fhandler_base::open: 0 = fhandler_base::open (u:\tmp\yahoo, 0x110000) > 181 5007107 [main] chmod 1436 fhandler_base::open_fs: 0 = fhandler_disk_file::open (u:\tmp\yahoo, 0x10000) > 185 5007292 [main] chmod 1436 chmod: -1 = chmod (/u/tmp/yahoo, 0x1B6) > 1226 5008518 [main] chmod 1436 open: open (/usr/share/locale/locale.alias, 0x0) > ... > > The first thing I can see is that 'fhandler_base::open:' returns with the 'windows error 5' > Is that the reason for chmod to fail later? Yes. Opening the file fails with "access denied" and then chmod has no file handle to work with. I'm sorry but I tried with 1.5.15 and 1.5.16 and I couldn't find a situation in which this happens for me. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/