delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/08/18:19:08

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=AWL,BAYES_50,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Date: Wed, 08 Sep 2010 15:17:37 -0700
From: Quanah Gibson-Mount <quanah AT zimbra DOT com>
To: cygwin AT cygwin DOT com
Subject: Oddities with file deletion on CIFS drive
Message-ID: <FF9587650EB15D3C59CFAA56@[192.168.1.2]>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

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 *

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
-r-xr-xr-x 1 ???????? ????????  636 2010-09-08 13:31 BUILD_LABEL_template
-r-xr-xr-x 1 ???????? ???????? 1536 2010-09-08 13:31 
BUILD_WIN_UPDATE_template
-r-xr-xr-x 1 ???????? ???????? 1699 2010-09-08 13:31 BUILD_template
-r-xr-xr-x 1 ???????? ???????? 4508 2010-09-08 13:31 BUILD_template_FOSS
-r-xr-xr-x 1 ???????? ???????? 7118 2010-09-08 13:31 
BUILD_template_FOSS_ThirdParty
-r-xr-xr-x 1 ???????? ???????? 1453 2010-09-08 13:31 BUILD_template_ISYNC
-r-xr-xr-x 1 ???????? ???????? 5535 2010-09-08 13:31 BUILD_template_NETWORK
-r-xr-xr-x 1 ???????? ???????? 7975 2010-09-08 13:31 
BUILD_template_NETWORK_ThirdParty
-r-xr-xr-x 1 ???????? ???????? 1463 2010-09-08 13:31 BUILD_template_TOASTER
-r-xr-xr-x 1 ???????? ???????? 2989 2010-09-08 13:31 BUILD_template_ZDESKTOP
-r-xr-xr-x 1 ???????? ???????? 1386 2010-09-08 13:31 BUILD_test

Even with -f, it failed to delete these files.  Files that were created by 
this very user.

Now, if I modify the file to be +w, then -w, so it returns to its original 
permissions, I can suddenly delete it:

build AT zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates
$ chmod a+w BUILD_EVO_template

build AT zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates
$ chmod a-w BUILD_EVO_template

build AT zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates
$ rm BUILD_EVO_template

build AT zre-win-002 
/cygdrive/z/current/WINDOWS/main/20100908131458_ZDESKTOP/ZimbraBuild/templates
$ ls -l
total 96
-r-xr-xr-x 1 ???????? ???????? 1453 2010-09-08 13:31 BUILD_ISYNC_template
-r-xr-xr-x 1 ???????? ????????  636 2010-09-08 13:31 BUILD_LABEL_template
-r-xr-xr-x 1 ???????? ???????? 1536 2010-09-08 13:31 
BUILD_WIN_UPDATE_template
-r-xr-xr-x 1 ???????? ???????? 1699 2010-09-08 13:31 BUILD_template
-r-xr-xr-x 1 ???????? ???????? 4508 2010-09-08 13:31 BUILD_template_FOSS
-r-xr-xr-x 1 ???????? ???????? 7118 2010-09-08 13:31 
BUILD_template_FOSS_ThirdParty
-r-xr-xr-x 1 ???????? ???????? 1453 2010-09-08 13:31 BUILD_template_ISYNC
-r-xr-xr-x 1 ???????? ???????? 5535 2010-09-08 13:31 BUILD_template_NETWORK
-r-xr-xr-x 1 ???????? ???????? 7975 2010-09-08 13:31 
BUILD_template_NETWORK_ThirdParty
-r-xr-xr-x 1 ???????? ???????? 1463 2010-09-08 13:31 BUILD_template_TOASTER
-r-xr-xr-x 1 ???????? ???????? 2989 2010-09-08 13:31 BUILD_template_ZDESKTOP
-r-xr-xr-x 1 ???????? ???????? 1386 2010-09-08 13:31 BUILD_test


This behavior is quite bizarre.  I should be able to delete the files I 
created with the "-f" option to "rm".

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra ::  the leader in open source messaging and collaboration

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