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 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: AW: 1.5.16-1: chmod problem Date: Tue, 3 May 2005 08:52:47 +0200 Message-ID: From: "Pach Roman (GS-EC/ESA4) *" To: X-OriginalArrivalTime: 03 May 2005 06:52:47.0969 (UTC) FILETIME=[B7642510:01C54FAC] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j436r4Ne032668 Hello I took a look at the drive properties ones more. The following acl rights has been given me by the network administrator: - change file permission: no - all others: yes Unfortunately the Windows has a special attribute 'write protection' which can be set in the mask for file's attribute. So there is a kind of conflict now. Despite I can't change file permissions (in the acl) I can every time set/reset the bit 'write protection'. I see, it is very interesting feature of the so called operating system. There is the question at this place: Should the implementation of chmod allow the setting/resetting of the 'write protection' bit in spite of the missing permission 'change file permission' in the acl ? Roman -----Ursprüngliche Nachricht----- Von: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]Im Auftrag von Corinna Vinschen Gesendet: Montag, 2. Mai 2005 16:03 An: cygwin AT cygwin DOT com Betreff: Re: 1.5.16-1: chmod problem 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/ -- 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/