DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 56EEe4vd475912 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 56EEe4vd475912 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=sIFJor3z X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5A173857712 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1752504002; bh=NF10+E4zGbWIBR2IfSiCDRcXrrwl9Krx2GAYkkS66MA=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=sIFJor3zLVQKeqT0JFVBD72SMuRAaapPGaeqfB4yECzWB0bSf+byz2ccSI2pDCYGh VF7esHiQ+YQ+CSiai/jkovMW4jSOMePWqAOzDgYMNX5iebQHABXvZqZOjySAqY4yhJ RghVmnkv5ky6vf3p4kNqXG3XeIrvvNKOI7wgqaCw= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1522A3858C2F Date: Mon, 14 Jul 2025 16:39:36 +0200 To: cygwin AT cygwin DOT com Subject: Re: rmdir of non empty dir causes wrong errno with SMB or NFS fs Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 56EEe4vd475912 Hi Aurélien, On Jul 12 15:02, Aurélien Couderc wrote: > Cygwin 3.7.0-0.219.gbf81e32f29e0.x86_64, /bin/rmdir causes wrong errno > if the filesystem is SMB or NFS. > > Test case: > bash -c 'rm -Rf d1 ; mkdir d1 ; touch d1/f1 ; rmdir d1' > > On C; I get: > rmdir: failed to remove 'd1': Directory not empty > > On N: (Windows NFS) I get: > rmdir: failed to remove 'd1': Bad address > > if I trace this I get: > bash -c 'rm -Rf d1 ; mkdir d1 ; touch d1/f1 ; strace -o > /tmp/rmdirtracelog.txt rmdir d1' > rmdir: failed to remove 'd1': Permission denied > > Both "Bad address" and "Permission denied" are IMO wrong, the expected > error would be "Directory not empty". I can't reproduce this: $ uname -r 3.7.0-dev-228-g8065978ff838.x86_64 $ cd $ bash -c 'rm -Rf d1 ; mkdir d1 ; touch d1/f1 ; rmdir d1' rmdir: failed to remove 'd1': Directory not empty $ cd $ bash -c 'rm -Rf d1 ; mkdir d1 ; touch d1/f1 ; rmdir d1' rmdir: failed to remove 'd1': Directory not empty Sorry, I have no idea why this fails for you. On a hunch, are you missing identity mapping? Different SIDs on SMB, no identity mapping on NFS? Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple