X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 10 Sep 2010 11:16:32 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Oddities with file deletion on CIFS drive Message-ID: <20100910091632.GB16534@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=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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 Sep 8 15:17, Quanah Gibson-Mount wrote: > I have a CIFS drive I connect to as the windows user. I can write > to the drive with no problem. However, when I go to delete files > from the drive, Cygwin behaves very oddly. > > build AT zre-win-002 /cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates > $ rm -f * If you call rm w/o the -f flag, what error message do you get? Just a simple "Permission denied", I guess. > build AT zre-win-002 /cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates > $ ls -l > total 104 > -r-xr-xr-x 1 ???????? ???????? 1362 2010-09-08 13:31 BUILD_EVO_template > -r-xr-xr-x 1 ???????? ???????? 1453 2010-09-08 13:31 BUILD_ISYNC_template > [...] > Now, if I modify the file to be +w, then -w, so it returns to its > original permissions, I can suddenly delete it: Did you create the files with a Cygwin aplication or with a native Win32 application? In theory, there's nothing mysterious here, if the permissions of the file are so that the DELETE permission for your user or group is missing in the file's ACL. For obvious reasons the POSIX permission bits can't reflect the complexity of the original NT ACL. The chmod +w/-w somehow overwrite the original permissions with POSIX permissions as Cygwin generates them and the result is more DELETE friendly. Did you try to compare the ACL before and after the chmod? The output of `cacls filename' is probably different. > This behavior is quite bizarre. I should be able to delete the > files I created with the "-f" option to "rm". Well, in theory, yes. However, it's possible that your CIFS drive has semantics which disallow this with the original ACL for some reason. Can you pleae run `strace -o rm.trace rm some_file' on a file which has the original ACL (before the chmod call) and send the rm.trace file? 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