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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Mon, 21 Oct 2002 21:27:11 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: cvs unable to remove lock directory; rm -r works In-Reply-To: Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 21 Oct 2002, Igor Pechtchanski wrote: > Hi, > > I've been trying to track this down for a few days, to no avail. > I have a cvs repository on a samba drive. My OS is Win2k SP2; CYGWIN is > set to "check_case:strict ntsec notitle nosmbntsec". My cvs is 1.11.0-1 > (I tried both the distribution binary and the one built from the source). > I also tried both cygwin-1.3.13-2 and the cvs HEAD. > > When I attempt to check in a file, I receive the following message from > cvs: > > $ cvs commit -m "" aaaa > Checking in aaaa; > /export/home/igor/testrepository/aaaa,v <-- aaaa > new revision: 1.9; previous revision: 1.8 > done > cvs commit: failed to remove lock dir /export/home/igor/testrepository/#cvs.lock: Permission denied > $ > > The relevant mount is > > $ mount | grep export > \\samba.watson.ibm.com\igor on /export/home/igor type user (binmode) > $ > > I'm able to manually remove the directory using 'rm -rf'. Furthermore, > the following program also works: > > $ cat > t.c > #include > void main() { > const char *dir = "/export/home/igor/testrepository/#cvs.lock"; > int res = rmdir(dir); > printf ("%d = rmdir(\"%s\")\n", res, dir); > } > $ make t > gcc t.c -o t > $ ./t > 0 = rmdir("/export/home/igor/testrepository/#cvs.lock") > $ > > As far as I could see, cvs also uses the rmdir from cygwin1.dll. Yet it > was unable to remove the directory, for some reason. Tracing it under gdb > showed that GetLastError after RemoveDirectory() returned 5 > (ERROR_ACCESS_DENIED) when called from cvs. > > Would anyone have any pointers on how I could debug this further? Thanks, > Igor Some more info on this: I defined CVS_RMDIR to point to my own function that would print a message and then fork and exec /bin/rmdir with the directory as an argument, and recompiled cvs. Running cvs commit now resulted in the following: $ /usr/src/cvs-1.11.0/build/src/cvs commit -m "" aaaa Checking in aaaa; /export/home/igor/testrepository/aaaa,v <-- aaaa new revision: 1.11; previous revision: 1.10 done Attempting to remove directory '/export/home/igor/testrepository/#cvs.lock' rmdir: `/export/home/igor/testrepository/#cvs.lock': Permission denied cvs commit: failed to remove lock dir /export/home/igor/testrepository/#cvs.lock: I/O error $ /bin/rmdir /export/home/igor/testrepository/#cvs.lock $ echo $? 0 $ Any ideas on how to proceed with this would be welcome. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/