delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/02/09/10:02:15

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 519F2Emt3790112
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 519F2Emt3790112
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=MK/nJVcm
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01FB23858C3A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1739113333;
bh=postMy6eoFmKW9qH79MVDQeozys5c2jb4t7qETBC8Lw=;
h=Subject:To:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:Cc:From;
b=MK/nJVcmbYfT4m1gtr+3QdHvXv6ghHcpH5k0zv5o7p3bVRkB0CPAUbcS4xKHaXIM0
pyCteH7ljOKaWF0DS1tvDzc21Y1Sh1Xu4cS23fvXEW0Iba9Q4bIubaVf9ZWgN590sC
a/RHs/+4eML2Xnam5iDAml/7hOTocswDUqgun4Ac=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 723353858D26
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 723353858D26
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739113275; cv=none;
b=Tkxt1vcUQGVfEnrbFq6V46p9qSdwiSEanqe4aas5l4eQHYMUVr4LbNfsLLwS0raIXBlTvlbxFfGBJsvQQgYNz2SMWtTMK0rkzPJ+zF2/WFj79wJQFG/CqT3Gyg25M98rgORXUzGKkAWF/ED1Z4tyDkiASc8OpiT7cWJUi27gBhY=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1739113275; c=relaxed/simple;
bh=mPmwKQs5y8vjkT+Ae9tBiQrxwM0lCaF132CyY0xRJyg=;
h=From:Subject:To:Message-ID:Date:MIME-Version;
b=K506tYOGv+aZp3D4U9uIf8aRke686aMKPTQFOemNPvcqAlVhOfT6+mQL208cATKEMCrF/I1BoMZeTVH7Wee0JsFwTE//4/Iyv/isJhzqPCEubNO8ulJMzB265EaHv8wAQ7t+YWBc+4T+UxyMZrldeoMRllTgsJH1BoDtQpjgC9A=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 723353858D26
Subject: coreutils-9.0-1: chmod -R silently returns failure if dir contains a
symlink (regression)
To: cygwin AT cygwin DOT com
Message-ID: <c671ee35-f342-c63f-b7ad-56b7508151d6@t-online.de>
Date: Sun, 9 Feb 2025 16:01:10 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101
SeaMonkey/2.53.20
MIME-Version: 1.0
X-TOI-EXPURGATEID: 150726::1739113269-30FF6861-E0078152/0/0 CLEAN NORMAL
X-TOI-MSGID: 909459bb-7094-45c2-975d-33fd79b94f00
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Christian Franke via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Christian Franke <Christian DOT Franke AT t-online DOT de>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Testcase:

$ uname -r
3.5.7-1.x86_64

$ cygcheck -f /bin/chmod
coreutils-9.0-1

$ mkdir dir

$ touch dir/file

$ chmod -R -v g-w dir; echo $?
mode of 'dir' retained as 0755 (rwxr-xr-x)
mode of 'dir/file' retained as 0644 (rw-r--r--)
0

$ ln -s file dir/link

$ chmod -R -v g-w dir; echo $?
mode of 'dir' retained as 0755 (rwxr-xr-x)
mode of 'dir/file' retained as 0644 (rw-r--r--)
neither symbolic link 'dir/link' nor referent has been changed
1

$ chmod -R g-w dir; echo $?
1

$ chmod -v g-w dir dir/file dir/link; echo $?
mode of 'dir' retained as 0755 (rwxr-xr-x)
mode of 'dir/file' retained as 0644 (rw-r--r--)
mode of 'dir/link' retained as 0644 (rw-r--r--)
0

$ chmod -R -v g+w dir; echo $?
mode of 'dir' changed from 0755 (rwxr-xr-x) to 0775 (rwxrwxr-x)
mode of 'dir/file' changed from 0644 (rw-r--r--) to 0664 (rw-rw-r--)
neither symbolic link 'dir/link' nor referent has been changed
1

$ chmod -R g-w dir; echo $?
1

Exit status 1 does not occur with chmod from coreutils 8.32-1.

-- 
Regards,
Christian


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019