www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/02/20/11:51:19

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51KGpI4i341644
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 51KGpI4i341644
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=XfM/8n4d
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E35AD385841C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1740070277;
bh=m8wOh/5Wag7mdzIbIsW4xeqkNCnAuHOmzyTQO2smY5E=;
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=XfM/8n4dxffHcE1RMrWdrx3qtemKIix/A3j6QTVYMh+itQNE/UpT5CYUrRSwpO28H
SsjFlS6aBYqtmhvccg4ooH9DzV2XRhOFcTwSWwZ0JTDVlYy7bUODOEQPgE9tCYpMBW
6KX2quZh/7ym5EYtMnTCEH7LT22aRDR4H43ID3gE=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0AFF3858C42
Date: Thu, 20 Feb 2025 17:50:23 +0100
To: cygwin AT cygwin DOT com
Subject: Re: [regression-3.6] coreutils mkdir broken on UNC paths
Message-ID: <Z7ddT9ATJ1rcguA-@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CALXu0UdHbasuyBiVZveyvJ1+K168QKBu0wn_cEVG8z+zfqQQeg AT mail DOT gmail DOT com>
<CALXu0Ufgg-t9P+Rkrk2_RTp6iRJcptSK6gEntEbs9q=usQ5WNQ AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CALXu0Ufgg-t9P+Rkrk2_RTp6iRJcptSK6gEntEbs9q=usQ5WNQ@mail.gmail.com>
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-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
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: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 51KGpI4i341644

On Feb 20 15:16, Cedric Blancher via Cygwin wrote:
> On Thu, 20 Feb 2025 at 14:55, Cedric Blancher <cedric DOT blancher AT gmail DOT com> wrote:
> >
> > Good afternoon!
> >
> > Cygwin 3.6.0-0.378.g78fb13d21f4f.x86_64, Cygwin coreutils package 9.6-1
> >
> > coreutils mkdir is broken on UNC paths:
> >
> > mkdir -p -- "//ember.data4.local/afs/disk11/builds/bash/install_root/usr/local/bin"
> > mkdir: cannot create directory ‘//ember.data4.local’: Read-only file system

Works for me:

 [~]$ mkdir -p -- //calimero/corinna/newdir             <-- Samba
 [~]$ echo $?
 0
 [~]$ mkdir -p -- //calimero.vinschen.de/ext/newdir     <-- NFS
 [~]$ echo $?
 0
 [~]$ mkdir -p -- //vmbert2k25/c\$/newdir               <-- Windows SMB

If there *really* is a bug and you want it fixed, we need a *thorough*
bug description, a reliable reproducer or a useful trace.

> > This happens because you cannot do a "cd .." in
> > //ember.data4.local/afs, because "afs" is the UNC prefix for that
> > filesystem.
> 
> Might not be coreutils issue, looks more like a Cygwin issue:
> strace shows that Cygwin tries a mkdir("//ember.data4.local"), which
> fails, and then a chdir("//ember.data4.local"), which also fails
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>   912  621383 [main] mkdir 10898 __set_errno: virtual int
> fhandler_base::mkdir(mode_t):1672 setting errno 30
>  1108  622491 [main] mkdir 10898 mkdir: -1 =
> mkdir(//ember.data4.local, 511), errno 30
>   734  623225 [main] mkdir 10898 chdir: dir '//ember.data4.local'
>   899  624124 [main] mkdir 10898 normalize_posix_path: src //ember.data4.local
>  1241  625365 [main] mkdir 10898 normalize_posix_path:
> //ember.data4.local = normalize_posix_path (//ember.data4.local)
>   870  626235 [main] mkdir 10898 mount_info::conv_to_win32_path:
> conv_to_win32_path (//ember.data4.local)
>   809  627044 [main] mkdir 10898 mount_info::conv_to_win32_path:
> src_path //ember.data4.local, dst \\ember.data4.local, flags 0x0, rc 0
>   723  627767 [main] mkdir 10898 build_fh_pc: fh 0x800009DA0, dev 000000C2
>   782  628549 [main] mkdir 10898 __set_errno: int chdir(const
> char*):3837 setting errno 2
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

This trace snippet is not helpful.  Looks like you removed the really
interesting part of the trace, showing where errno 30 (EROFS) comes
from.  Alternatively you debug this in GDB yourself.


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

- Raw text -


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