GNU bug report logs - #79445
`ln -s` should raise a warning about pwd-relative vs symlink-location-relative targets

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: Chris <seahen123@HIDDEN>; dated Sun, 14 Sep 2025 04:57:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Collin Funk <collin.funk1@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 79445 <at> debbugs.gnu.org:


Received: (at 79445) by debbugs.gnu.org; 14 Sep 2025 09:25:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 14 05:25:09 2025
Received: from localhost ([127.0.0.1]:59931 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uxiyq-0005Jp-Go
	for submit <at> debbugs.gnu.org; Sun, 14 Sep 2025 05:25:09 -0400
Received: from mail-yb1-xb33.google.com ([2607:f8b0:4864:20::b33]:48402)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <seahen123@HIDDEN>)
 id 1uxiyn-0005Ik-BB
 for 79445 <at> debbugs.gnu.org; Sun, 14 Sep 2025 05:25:06 -0400
Received: by mail-yb1-xb33.google.com with SMTP id
 3f1490d57ef6-ea3e0b4a98aso1236903276.1
 for <79445 <at> debbugs.gnu.org>; Sun, 14 Sep 2025 02:25:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1757841899; x=1758446699; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=TR4ZwkLa3iRK6SdS6gpkorxflxJKqUphlmSrViARcMo=;
 b=jvp+FDKc7IJOzyNmLQp1l1O0Sgl+yfn9g9tJ6wn16hneHOR5vYDaodsuTRwLJSOTM4
 KgijnPkTnwLzBNmGLHLMU/BX18kiiV/ttHveuxcWE+S2v0nnZM15mRVCVIuGv8SG/aua
 C2DuoRGgpgLxeO5ZD46GVIkcH+K4kxv9YlAwkI0QG0e/j0f4g+Pg2/89KuiG6tp1gCd6
 dXT7i65rvGhjoAHk8Nk8IA3bP2JX1IcRWwvIUz68+RuqQaiGhP7/E0L3jFUDxfzqg2iV
 6vH1RFyffwP58U9EcSKY4CJPw/ZvGcA1rHwSqT0jKmf7CgeWKwtawE7HHH7GboW2XI2l
 pPFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1757841899; x=1758446699;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=TR4ZwkLa3iRK6SdS6gpkorxflxJKqUphlmSrViARcMo=;
 b=D/ZO1FNpG71YkpeOkqxR+/Y1Ex2LaedCCVuIvODEhTlqWZbzrsf5SsEV7JaP8U73OL
 NVi/MU3fPsoxwtMhka4GjVw/cF1SMWscm4HyjT6dg9dVLRvYwP+5kZzApl0axdjXGtvR
 tYJCcLXQ+mjpKN8uFmI0K8Gtm8Uo9BZtD/QpmOxaxNkLAkloVJF/Sa5oSVc/GBZcCki7
 WfBrn/OM60Dfw0rCKsmB1J3S5n9QJZVi1EpuT+J6ctAOh1D27rMWuyoHRrAk5Rjux2ln
 +HOZ0TOk4tlOlbGiIZrqZRdm99Po+UAbFdziskVivks5RdjMcDDa2NZ0Dm9FDE4DzAed
 +ZRw==
X-Forwarded-Encrypted: i=1;
 AJvYcCWHVyXBz514RIEzux+aohJ5qv19zJILvuVE8NSP9zxd4PFNb2zSVra+tDGwTu7CFmRzYNaBIA==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzZtqGFs7r6dqLcdEC3QwR4vfq6BY7sJGNQNG0AOSo0JMupQsNQ
 fwg1VRjIix+aQ5whCVdT2F3sGXjuXTo5W8oM30vd06w7r2iVGtbHyr1Ew99jnrw1CtffED7H5n/
 HYCy7vTzAK1+01QaoDS91ifextOm+g9MIPso6
X-Gm-Gg: ASbGncuCXVkwn5h8BP1nU8iDr/j9Nce1Gc2GPWVkxv8hZJXxzobbTTQkTe6eqanppFl
 3/XgOLqAPb5PimSafVDiYirbUQPP0virIxl7srDjt34aH4Dc4V/d2GhL5l0O0eHGQmLlzvWvNa1
 A56X4/Ti5gedCiNOc3v5nigh9ALBexu41Pg3Vfv4P+1T1Vfpsy59/994HILb6Ejd2srQJ3Z9rDL
 NsKs6xKLYoJNboFgTI=
X-Google-Smtp-Source: AGHT+IG8LtQsire2ozG7Lf6gY9205AbbnZudenrvf2Giy3I8Ek+p+UoySq0iztLrct5KFZW5Mg/OmlQfbMkdQyzpVpk=
X-Received: by 2002:a05:690c:3708:b0:72b:444d:6325 with SMTP id
 00721157ae682-73063d57af3mr83560897b3.20.1757841899210; Sun, 14 Sep 2025
 02:24:59 -0700 (PDT)
MIME-Version: 1.0
References: <CAPvCkbikc5FPmMGhBzVN3cxiBxLEUM7K_sgQDfQuO_QQeWqukA@HIDDEN>
 <ec333b39-9e9e-4701-b0cc-bf602f5a2b3d@HIDDEN> <871po9wmli.fsf@HIDDEN>
 <CAPvCkbhgCGUKoGbc+k1Yauf9e0+U3Hx4NVAVqOz2-pcdJt9Vpw@HIDDEN>
In-Reply-To: <CAPvCkbhgCGUKoGbc+k1Yauf9e0+U3Hx4NVAVqOz2-pcdJt9Vpw@HIDDEN>
From: Chris <seahen123@HIDDEN>
Date: Sun, 14 Sep 2025 02:24:48 -0700
X-Gm-Features: Ac12FXzjSdCPtnX1aC2fm7Ej52Q55w1wBEVZctHW0nJ1Q5rBlxASrRrDSDvpcRU
Message-ID: <CAPvCkbiwhBjpKt5K9AhSNKd1K4PuC6Wh6NFLgMapUzTSihDjsw@HIDDEN>
Subject: Re: bug#79445: `ln -s` should raise a warning about pwd-relative vs
 symlink-location-relative targets
To: Collin Funk <collin.funk1@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000f94f18063ebf7592"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 79445
Cc: Paul Eggert <eggert@HIDDEN>, 79445 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--000000000000f94f18063ebf7592
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

PS. This is about more than just learnability for newbies -- this issue
tripped me up after 18 years of using Linux as a desktop and/or dev
environment, because I ran into the rare case where a program (in this case
https://github.com/bbuhrow/yafu/) needed a separate working directory for
each instance and was useful to run multiple instances of in parallel (in
this case, factoring multiple different composites for https://factordb.com=
/
).

Sincerely,
Chris Hennick


On Sun, Sep 14, 2025 at 2:15=E2=80=AFAM Chris <seahen123@HIDDEN> wrote:

> Isn't it better to surprise users who know what they're doing with a
> warning, than to surprise users who *don't* know what they're doing with
> the lack of one?
>
> On Sat, Sep 13, 2025 at 11:54=E2=80=AFPM Collin Funk <collin.funk1@gmail.=
com>
> wrote:
>
>> Paul Eggert <eggert@HIDDEN> writes:
>>
>> > On 2025-09-13 03:16, Chris wrote:
>> >> It seems to me it should be easy enough to alert users to this gotcha
>> by
>> >> printing a warning to stderr when creating a symlink
>> >
>> > I dunno, that gotcha has been present in Unix and Linux for nearly 50
>> > years now, and lots of people are used to the gotcha would plausibly
>> > object to a warning.
>>
>> FWIW, relative symbolic links and dangling symlinks are covered in the
>> manual. You can read it online [1], or using the following command in
>> your terminal:
>>
>>     $ info '(coreutils) ln invocation'
>>
>> I agree that it probably is a point of confusion for someones first
>> encountering symbolic links, but it is a perfectly valid use of them. So
>> I think emitting a warning there would cause some complaints.
>>
>> New warnings tend to surprise people. I'm sure Paul remembers the many
>> long threads about the warning that 'egrep' and 'fgrep' are obsolete. :)
>>
>> Collin
>>
>> [1]
>> https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.ht=
ml#ln-invocation
>>
>

--000000000000f94f18063ebf7592
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>PS. This is about more than just learnability for new=
bies -- this issue tripped me up after 18 years of using Linux as a desktop=
 and/or dev environment,=C2=A0because I ran into the=C2=A0rare case where a=
 program (in this case=C2=A0<a href=3D"https://github.com/bbuhrow/yafu/">ht=
tps://github.com/bbuhrow/yafu/</a>) needed a separate working=C2=A0director=
y for each instance and was useful to run multiple instances of in parallel=
 (in this case, factoring multiple different composites for=C2=A0<a href=3D=
"https://factordb.com/">https://factordb.com/</a>).</div><div><br></div><di=
v><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signat=
ure"><div dir=3D"ltr"><div><div dir=3D"ltr"><div>Sincerely,<br>Chris Hennic=
k</div></div></div></div></div></div><br></div><br><div class=3D"gmail_quot=
e gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Sep =
14, 2025 at 2:15=E2=80=AFAM Chris &lt;<a href=3D"mailto:seahen123@HIDDEN=
">seahen123@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex"><div dir=3D"ltr">Isn&#39;t it better to surprise users=
 who know what they&#39;re doing with a warning, than to surprise users who=
 *don&#39;t* know what they&#39;re doing with the lack of one?</div><br><di=
v class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Sep 1=
3, 2025 at 11:54=E2=80=AFPM Collin Funk &lt;<a href=3D"mailto:collin.funk1@=
gmail.com" target=3D"_blank">collin.funk1@HIDDEN</a>&gt; wrote:<br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex">Paul Eggert &lt;<a href=
=3D"mailto:eggert@HIDDEN" target=3D"_blank">eggert@HIDDEN</a>&gt;=
 writes:<br>
<br>
&gt; On 2025-09-13 03:16, Chris wrote:<br>
&gt;&gt; It seems to me it should be easy enough to alert users to this got=
cha by<br>
&gt;&gt; printing a warning to stderr when creating a symlink<br>
&gt;<br>
&gt; I dunno, that gotcha has been present in Unix and Linux for nearly 50<=
br>
&gt; years now, and lots of people are used to the gotcha would plausibly<b=
r>
&gt; object to a warning.<br>
<br>
FWIW, relative symbolic links and dangling symlinks are covered in the<br>
manual. You can read it online [1], or using the following command in<br>
your terminal:<br>
<br>
=C2=A0 =C2=A0 $ info &#39;(coreutils) ln invocation&#39;<br>
<br>
I agree that it probably is a point of confusion for someones first<br>
encountering symbolic links, but it is a perfectly valid use of them. So<br=
>
I think emitting a warning there would cause some complaints.<br>
<br>
New warnings tend to surprise people. I&#39;m sure Paul remembers the many<=
br>
long threads about the warning that &#39;egrep&#39; and &#39;fgrep&#39; are=
 obsolete. :)<br>
<br>
Collin<br>
<br>
[1] <a href=3D"https://www.gnu.org/software/coreutils/manual/html_node/ln-i=
nvocation.html#ln-invocation" rel=3D"noreferrer" target=3D"_blank">https://=
www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html#ln-invoc=
ation</a><br>
</blockquote></div>
</blockquote></div>

--000000000000f94f18063ebf7592--




Information forwarded to bug-coreutils@HIDDEN:
bug#79445; Package coreutils. Full text available.

Message received at 79445 <at> debbugs.gnu.org:


Received: (at 79445) by debbugs.gnu.org; 14 Sep 2025 09:16:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 14 05:16:02 2025
Received: from localhost ([127.0.0.1]:59891 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uxiq1-0004aS-Pu
	for submit <at> debbugs.gnu.org; Sun, 14 Sep 2025 05:16:02 -0400
Received: from mail-yx1-xb135.google.com ([2607:f8b0:4864:20::b135]:59670)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <seahen123@HIDDEN>)
 id 1uxipy-0004ZL-Q2
 for 79445 <at> debbugs.gnu.org; Sun, 14 Sep 2025 05:16:00 -0400
Received: by mail-yx1-xb135.google.com with SMTP id
 956f58d0204a3-6296f6ce5f1so1061104d50.3
 for <79445 <at> debbugs.gnu.org>; Sun, 14 Sep 2025 02:15:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1757841352; x=1758446152; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=v6fLsic5wIzZXcW5riun2tFGkheJG2DqdPJHj0FDmOE=;
 b=U6XZRmwvYsKxCtGFbnEfSMqUWWiHMmXXz/cCuC5+ReR2RS75oHNXIhh9+KBnxt/g5N
 pHWMYoS5T+qae6+p8EQ6bjJhrmR8/AANEEtY5/FOfdzpnYGOmx9augQV9qurM1uLmaMC
 LHvldwElmB0B2K0X0mo41qBMHYD8wM4p9/HvNeftVQzGH9kxTxFQL235k7pdLYDHFPeK
 ZMqNWWxrZK0NdfMwO1T0hyDlTgqRtkLIDjgNyMlJHkRboIUNBvhhKpQo2iURT4Jchdas
 iEzlQETkmMk4kfNhQYdj7IwBx6lZ8K5xfoXOktLM2389bn2DmHmanfnG0lrCa2oPNv0l
 kBdA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1757841352; x=1758446152;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=v6fLsic5wIzZXcW5riun2tFGkheJG2DqdPJHj0FDmOE=;
 b=pPPzPLkmXT2WWRnZe1O/Rs5pfVyl4SfpTIBOsjg1cHJGka32BMKA8pa+e+mmxu463A
 F0Uc2KzdEs7ekCGyMDZ5zEgL+TEViWRh94xvWa0SeDA6tSTWke1QTsXCg9xmADVWJUqc
 0K4TumBTUVVGQL6Jn4NASZcv3hsjw+fMzPKx/cXuVLTCq8aWKSQPCwQKpg+UJIbU1o/i
 DW7wJFqblfdPkgj0lz6/Cl6ORfd1bYsfvIHuTJ6zMjXJ+oqAjrN/6+bflN3TuTuYivUA
 7/FmWHHHbFyTUR+Z4ELfRfneUAVVcA20eWug+zk+2n22iVHYtQDLC5GOIeLCd0CX2gYu
 MGqQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVaDGKYSnod07igxkLikweEbDqfYaUcCWnJf+NdnZGAxtfZ3Lz/Un5O83M7g3FGh9XitqRpCA==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzoP1X1oy6dYAwqn+3GSU3e3LvIUMmif4RI4n/eYGs8KfVZLV/o
 mrOWOSyIUX+s8HKoRVx+IldtlnmcYX9TWj5K5KwAAQ7yGsXoWIXx9qlcm01XqbweD/Bzh01BXNr
 FBOhl17PQwHyrwrMqiwXFctA2laVnMS8=
X-Gm-Gg: ASbGncvMGSGYY3eun/N0TlXOfK3Fx6FWQBWrR0w7+XEoEMRywx8tRAQADDtFa+JyiLe
 9oqeifQakeM5gQ4v/fStI6pXv1XoBjgBLZDNeZ+mbaWHjIEha5A+1U7NHLxz0CPEYekpplcYShq
 4FFv7qKKGuhL+KJr7haxvqHvtK5ONB6h6mHgvXS/qgmunoPp2/7G5yKPkmOAy74FlYFj1a5S63m
 nomSn3I
X-Google-Smtp-Source: AGHT+IGhjiNEDnbRTQ46tF7r8e4dN7HAvFfmknnofRZUXzOne0pLz16fj6mhK5BJlLPPRnk7M/QGPGbDft8+Al3YVko=
X-Received: by 2002:a53:d84e:0:b0:62c:1a1d:2bd9 with SMTP id
 956f58d0204a3-62c1a1d2d1dmr2649626d50.10.1757841352357; Sun, 14 Sep 2025
 02:15:52 -0700 (PDT)
MIME-Version: 1.0
References: <CAPvCkbikc5FPmMGhBzVN3cxiBxLEUM7K_sgQDfQuO_QQeWqukA@HIDDEN>
 <ec333b39-9e9e-4701-b0cc-bf602f5a2b3d@HIDDEN> <871po9wmli.fsf@HIDDEN>
In-Reply-To: <871po9wmli.fsf@HIDDEN>
From: Chris <seahen123@HIDDEN>
Date: Sun, 14 Sep 2025 02:15:40 -0700
X-Gm-Features: Ac12FXxaLjmkXSKbzU_ZH3e5cZ7rmAB4mSjIIxRCF2p7QD_V9x0XxKMP6kDCQKw
Message-ID: <CAPvCkbhgCGUKoGbc+k1Yauf9e0+U3Hx4NVAVqOz2-pcdJt9Vpw@HIDDEN>
Subject: Re: bug#79445: `ln -s` should raise a warning about pwd-relative vs
 symlink-location-relative targets
To: Collin Funk <collin.funk1@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000060fe97063ebf5528"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 79445
Cc: Paul Eggert <eggert@HIDDEN>, 79445 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--00000000000060fe97063ebf5528
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Isn't it better to surprise users who know what they're doing with a
warning, than to surprise users who *don't* know what they're doing with
the lack of one?

On Sat, Sep 13, 2025 at 11:54=E2=80=AFPM Collin Funk <collin.funk1@HIDDEN=
m> wrote:

> Paul Eggert <eggert@HIDDEN> writes:
>
> > On 2025-09-13 03:16, Chris wrote:
> >> It seems to me it should be easy enough to alert users to this gotcha =
by
> >> printing a warning to stderr when creating a symlink
> >
> > I dunno, that gotcha has been present in Unix and Linux for nearly 50
> > years now, and lots of people are used to the gotcha would plausibly
> > object to a warning.
>
> FWIW, relative symbolic links and dangling symlinks are covered in the
> manual. You can read it online [1], or using the following command in
> your terminal:
>
>     $ info '(coreutils) ln invocation'
>
> I agree that it probably is a point of confusion for someones first
> encountering symbolic links, but it is a perfectly valid use of them. So
> I think emitting a warning there would cause some complaints.
>
> New warnings tend to surprise people. I'm sure Paul remembers the many
> long threads about the warning that 'egrep' and 'fgrep' are obsolete. :)
>
> Collin
>
> [1]
> https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.htm=
l#ln-invocation
>

--00000000000060fe97063ebf5528
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Isn&#39;t it better to surprise users who know what they&#=
39;re doing with a warning, than to surprise users who *don&#39;t* know wha=
t they&#39;re doing with the lack of one?</div><br><div class=3D"gmail_quot=
e gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Sep =
13, 2025 at 11:54=E2=80=AFPM Collin Funk &lt;<a href=3D"mailto:collin.funk1=
@gmail.com">collin.funk1@HIDDEN</a>&gt; wrote:<br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex">Paul Eggert &lt;<a href=3D"mailto:eggert@=
cs.ucla.edu" target=3D"_blank">eggert@HIDDEN</a>&gt; writes:<br>
<br>
&gt; On 2025-09-13 03:16, Chris wrote:<br>
&gt;&gt; It seems to me it should be easy enough to alert users to this got=
cha by<br>
&gt;&gt; printing a warning to stderr when creating a symlink<br>
&gt;<br>
&gt; I dunno, that gotcha has been present in Unix and Linux for nearly 50<=
br>
&gt; years now, and lots of people are used to the gotcha would plausibly<b=
r>
&gt; object to a warning.<br>
<br>
FWIW, relative symbolic links and dangling symlinks are covered in the<br>
manual. You can read it online [1], or using the following command in<br>
your terminal:<br>
<br>
=C2=A0 =C2=A0 $ info &#39;(coreutils) ln invocation&#39;<br>
<br>
I agree that it probably is a point of confusion for someones first<br>
encountering symbolic links, but it is a perfectly valid use of them. So<br=
>
I think emitting a warning there would cause some complaints.<br>
<br>
New warnings tend to surprise people. I&#39;m sure Paul remembers the many<=
br>
long threads about the warning that &#39;egrep&#39; and &#39;fgrep&#39; are=
 obsolete. :)<br>
<br>
Collin<br>
<br>
[1] <a href=3D"https://www.gnu.org/software/coreutils/manual/html_node/ln-i=
nvocation.html#ln-invocation" rel=3D"noreferrer" target=3D"_blank">https://=
www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html#ln-invoc=
ation</a><br>
</blockquote></div>

--00000000000060fe97063ebf5528--




Information forwarded to bug-coreutils@HIDDEN:
bug#79445; Package coreutils. Full text available.

Message received at 79445 <at> debbugs.gnu.org:


Received: (at 79445) by debbugs.gnu.org; 14 Sep 2025 06:54:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 14 02:54:29 2025
Received: from localhost ([127.0.0.1]:59474 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uxgd2-0000oU-UY
	for submit <at> debbugs.gnu.org; Sun, 14 Sep 2025 02:54:29 -0400
Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:58706)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <collin.funk1@HIDDEN>)
 id 1uxgd0-0000ns-9O
 for 79445 <at> debbugs.gnu.org; Sun, 14 Sep 2025 02:54:27 -0400
Received: by mail-pf1-x429.google.com with SMTP id
 d2e1a72fcca58-7725fb32e1bso3282137b3a.1
 for <79445 <at> debbugs.gnu.org>; Sat, 13 Sep 2025 23:54:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1757832859; x=1758437659; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=wjmX2OwhQIUdGQPZdXpOWSIWDKigZmGcr7tBf2/KNXE=;
 b=CBPllzrwAQ4HjephtqUtwgVSsgT2YqT3e1uExijA+XijXy7iizF4xwpiKimEDBRAB6
 xyldISJZmLAvzWKQY4AQhuebQpaTLf9gtxCX5s/RCeo2FcXB2QYXuQWWEwM15ED2nmFD
 P+tn1pEAJUGiKuR9RctC8By4XF/d4zMvxL0dfQEX8b0NsW8oxwbmjS8rY6hZdQ+atNoZ
 jXyL7mRLa6wvwsH+fF083sbntaCSkb0280KrhPBToYAeEs6w4o7bgCx/TOcs4YFjqzQP
 0/hZRMpZFfhIZ1oJaJDpOzumPCtbD5R7i+Cgx0ycWleumristvLn7BJcREijAXGSlJeF
 TdUw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1757832859; x=1758437659;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=wjmX2OwhQIUdGQPZdXpOWSIWDKigZmGcr7tBf2/KNXE=;
 b=iEQmSePjbM9YiXVfKHgTXYVIedw8vA3YWlZ64rUWzYobfyvTFJ0ACixKmFlpZqxCf4
 t1Ot2VU2Adg0l3zok7+bwXbtUnXX+MPZ5Y4FiAGhJVxuZq31FrupLolKymLrLqV52dJd
 s7g6D5eW0PGX+myx9taPsjGrgB/gRQRJ0QbTGe1O9yXlHQ82tM31B32CsgUHyidhVqTf
 DirQigGi6N9Os2MbO6sQozePzpSERwLWiScoe5CsUBSdoeNGvzQDf2n/9r5xaJJpKd3K
 5CUGDoLPybvCqPIIKrSkxm+D/E0e5AdFpmJjTJ/civsOUa9s0s5fy71jhHDIcOyWQKaz
 qqkQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCV5RR4EkVOwvH7oLqYhgwHajlBOvCU80dJP15F7zMPcqeg+jhxBhsnGX1sT+oT/68BT/W3IUw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzdGNXNO5tpZLBoWO9PFIxu3Dev8iaMn5u+hSgWyDlQ1hVruRoE
 RPtcoMHb6F2zp5HwAwieGMluwYduROxnjZsMM9wpSjIYwuCPzuSaANEQA4Z4B8zW
X-Gm-Gg: ASbGnctPq4tBBr4RD3sXksx9jRKecB2jEXnakeaIervQsAxcWWW4R0FyO5f7zR8NaAT
 SHWFa3/2KtcPkfR9Ui/eR0sxs1gF3YDk6t9+tH/uinY3PkiIb3REyAzOFz0OowCVBWGT7prm2DT
 UhaHR+NcN9rdVfNhG/fi+DtkaSZTYS1IzuxRiaoYvs1UJ8jnOc9Aokq+cV4V0YEAdwKc7a2mCn+
 NNNHy+zzTFRE2wmePhwBLgxNk2rEoSCcXhQP1BYuisvSClbXavHXdSqsf4nyYz/Vj2gS1VoiTaz
 V/5jxXPOq/af7ZY6I4tvnzaw6/DzKGCz3YkAFR0KZ48rcbVm0LO3qcYHBZ6FC8mmdOFNQroA2T7
 gEZs9LEI3CeZugpE=
X-Google-Smtp-Source: AGHT+IGQho8HvG2omZrziP1yLt9C0ssIT1SXcKCvEjxPjKFbOkluqDXmamAF/09LzJipe9K8HV7ouw==
X-Received: by 2002:a05:6a00:1883:b0:76b:42e5:fa84 with SMTP id
 d2e1a72fcca58-77612063fd2mr9535984b3a.7.1757832859184; 
 Sat, 13 Sep 2025 23:54:19 -0700 (PDT)
Received: from fedora ([2601:646:8081:3770::aac3])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-777b2074bcbsm834071b3a.18.2025.09.13.23.54.18
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 13 Sep 2025 23:54:18 -0700 (PDT)
From: Collin Funk <collin.funk1@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#79445: `ln -s` should raise a warning about pwd-relative vs
 symlink-location-relative targets
In-Reply-To: <ec333b39-9e9e-4701-b0cc-bf602f5a2b3d@HIDDEN>
References: <CAPvCkbikc5FPmMGhBzVN3cxiBxLEUM7K_sgQDfQuO_QQeWqukA@HIDDEN>
 <ec333b39-9e9e-4701-b0cc-bf602f5a2b3d@HIDDEN>
Date: Sat, 13 Sep 2025 23:54:17 -0700
Message-ID: <871po9wmli.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 79445
Cc: Chris <seahen123@HIDDEN>, 79445 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Paul Eggert <eggert@HIDDEN> writes:

> On 2025-09-13 03:16, Chris wrote:
>> It seems to me it should be easy enough to alert users to this gotcha by
>> printing a warning to stderr when creating a symlink
>
> I dunno, that gotcha has been present in Unix and Linux for nearly 50
> years now, and lots of people are used to the gotcha would plausibly
> object to a warning.

FWIW, relative symbolic links and dangling symlinks are covered in the
manual. You can read it online [1], or using the following command in
your terminal:

    $ info '(coreutils) ln invocation'

I agree that it probably is a point of confusion for someones first
encountering symbolic links, but it is a perfectly valid use of them. So
I think emitting a warning there would cause some complaints.

New warnings tend to surprise people. I'm sure Paul remembers the many
long threads about the warning that 'egrep' and 'fgrep' are obsolete. :)

Collin

[1] https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html#ln-invocation




Information forwarded to bug-coreutils@HIDDEN:
bug#79445; Package coreutils. Full text available.

Message received at 79445 <at> debbugs.gnu.org:


Received: (at 79445) by debbugs.gnu.org; 14 Sep 2025 05:24:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 14 01:24:09 2025
Received: from localhost ([127.0.0.1]:59123 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uxfDd-0000dy-4M
	for submit <at> debbugs.gnu.org; Sun, 14 Sep 2025 01:24:09 -0400
Received: from mail.cs.ucla.edu ([131.179.128.66]:42090)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eggert@HIDDEN>)
 id 1uxfDY-0000dC-Ra
 for 79445 <at> debbugs.gnu.org; Sun, 14 Sep 2025 01:24:05 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 2F3313C2E8B5A;
 Sat, 13 Sep 2025 22:23:58 -0700 (PDT)
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP
 id w_YqeLDZ-Hlg; Sat, 13 Sep 2025 22:23:58 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by mail.cs.ucla.edu (Postfix) with ESMTP id 082EA3C30600A;
 Sat, 13 Sep 2025 22:23:58 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 082EA3C30600A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
 s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1757827438;
 bh=kz4k8N1mK3VW8Nh0clJUTllrVgWP8/R3rvlgJhTnCc4=;
 h=Message-ID:Date:MIME-Version:To:From;
 b=MNedVN6T/VF/uA1njuhTQe6LITiUdm7ez9qRSPJb0matZ3giFtU250ArGCRBncpDX
 m8fMBL1w5SlAfQccJpa24hqBuZJKalGkJBqvtSyS64M/NmenQYrwVQhNKQYdXy3biW
 ce2o7PC0Ryd219nEZ93Vcxwz+lPmFZPwnfahmrVO2suRGdwL+shL2xC4Wkyc0HPe7k
 wlmSLtVJRGQyNynY0XPGojotJUwKsEvwN+xLgaGEiiKGLJ8n7rwtDrm2Q4DaekJRI2
 9EtFZyH5A7to3zRZK7FgPOpB8UNGdc5WkS4vpAPuSyFlRLrYZzOPh6DjBD+LIq05hg
 V2D2zgj2JtTsw==
X-Virus-Scanned: amavis at mail.cs.ucla.edu
Received: from mail.cs.ucla.edu ([127.0.0.1])
 by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP
 id gMswsGCtkZmS; Sat, 13 Sep 2025 22:23:57 -0700 (PDT)
Received: from penguin.cs.ucla.edu
 (47-154-17-226.fdr01.snmn.ca.ip.frontiernet.net [47.154.17.226])
 by mail.cs.ucla.edu (Postfix) with ESMTPSA id E2F103C2E8B5A;
 Sat, 13 Sep 2025 22:23:57 -0700 (PDT)
Message-ID: <ec333b39-9e9e-4701-b0cc-bf602f5a2b3d@HIDDEN>
Date: Sat, 13 Sep 2025 22:23:57 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#79445: `ln -s` should raise a warning about pwd-relative vs
 symlink-location-relative targets
To: Chris <seahen123@HIDDEN>
References: <CAPvCkbikc5FPmMGhBzVN3cxiBxLEUM7K_sgQDfQuO_QQeWqukA@HIDDEN>
Content-Language: en-US
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <CAPvCkbikc5FPmMGhBzVN3cxiBxLEUM7K_sgQDfQuO_QQeWqukA@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79445
Cc: 79445 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2025-09-13 03:16, Chris wrote:
> It seems to me it should be easy enough to alert users to this gotcha by
> printing a warning to stderr when creating a symlink

I dunno, that gotcha has been present in Unix and Linux for nearly 50 
years now, and lots of people are used to the gotcha would plausibly 
object to a warning.





Information forwarded to bug-coreutils@HIDDEN:
bug#79445; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Sep 2025 04:56:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 14 00:56:55 2025
Received: from localhost ([127.0.0.1]:59009 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uxenG-0006ff-NA
	for submit <at> debbugs.gnu.org; Sun, 14 Sep 2025 00:56:55 -0400
Received: from lists.gnu.org ([2001:470:142::17]:38298)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <seahen123@HIDDEN>)
 id 1uxNJc-0007Cm-0d
 for submit <at> debbugs.gnu.org; Sat, 13 Sep 2025 06:17:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <seahen123@HIDDEN>)
 id 1uxNJK-0002YU-UW
 for bug-coreutils@HIDDEN; Sat, 13 Sep 2025 06:16:52 -0400
Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <seahen123@HIDDEN>)
 id 1uxNJI-0003zr-LV
 for bug-coreutils@HIDDEN; Sat, 13 Sep 2025 06:16:50 -0400
Received: by mail-yb1-xb32.google.com with SMTP id
 3f1490d57ef6-ea3d605bf7eso1602174276.3
 for <bug-coreutils@HIDDEN>; Sat, 13 Sep 2025 03:16:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1757758605; x=1758363405; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=82rcBOm7re1bOzhGAxLwGCTeDUhFIPXt8Z4GOkArshk=;
 b=elyy/meinzajmFWZI+vk4KhutkDUcQwVROH53HVrGdhiEb0b5FqFGswInHTLZzLglx
 tUrFEs7o3Y+MlTKQCPe/oMV0kSXRWmUHLyXQSst/3ZoYcNqOk+pJarvFzPuiRu1/A5HF
 HbJSBVS7U3E/balsewiyPgnNO+9ngI3p1TuatrfQ7klXwBa5Lb0ijLHC2Xk+4x93Ky5w
 u52mOm6BxB7G2owjxUuVG6D66HsS2jfmj/eKvVFPMwDBSKPkK95wSJXFlKeY8qTzURyO
 Q5pgpS9zMQQcPIxAH6hKQgZTAyCQyrKL4/T28E8AMmOMvwos0zFPzgZyz3mm3fvdr5yY
 lONg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1757758605; x=1758363405;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=82rcBOm7re1bOzhGAxLwGCTeDUhFIPXt8Z4GOkArshk=;
 b=WL7iwGa1ZSv1me+vg57d3mVJGpe0HYoWHDHB/gzoOI9fsZEwHr8RWaGlOLuKAWz2qq
 qFSQKCkbdjTKulzWMgAcUYh9D2AaUUsb9Eaj7I5JInfbz9OLrrgTrlQ3CeVzqYEH/a0D
 Twol99dcReMRCYJDjZu7i6lwrNQrEp6+nmusD56ht//FkUtkMuL0eIw+N08jd9J2tMpw
 EpLT3IMq1ulJoEXMC5QQuGUtUbxWnsplwNtgab2lFhWyA0t0Io9noJpx5sdz0APTdbtg
 pUSxWlRQ/LaMUfJ2v3/74RzkWewgZDLz6AIvXbjsIz9pvMdqdJ6NcgQDn5vB24iSKnvR
 Ulxw==
X-Gm-Message-State: AOJu0YzGGaMegBKR68IVwZ2U7pExXsA5+LmuxjWRyAcDv5WNdwiesEgb
 kyfLRFoY2kcDNotqQDAYPEXjrhAKI9pUbiKNO+3dDSHtncbyYZ6odUJx7DEf33pIeWg2o5L7h9J
 MudOyo3kBBH2V2uiuDjHmt1hyzLdH21gs8E1Q
X-Gm-Gg: ASbGncuWy3Yd24KgGsX2HoxxIEgLzXj5RfqprxS754PR6uuJDL+ELPooaQLCkM689T9
 MBSwHfqXBKxYCk2h4jeiftUEEIlui4ULXp1kFDNkuYIK8+SzPVgtkdekzXhpuM8tWfcNl+ceDoW
 ZYxXrbRIpTE3AQ8U+z+yKWQ41X6BVDk275+0gdhssQJyqtg3DW2S19IQV1w8T2WZ1CEbRjAk8Kf
 6qt3DQPDsyQxUOlPfY=
X-Google-Smtp-Source: AGHT+IHc8bYo5GgE/ld4aft8lJmIoJl5n9dENXqJoAaO+KTUPtkql5X/k5ryeBi4fMgxezz7n5hjyAoaPyWZD9x1Fsc=
X-Received: by 2002:a05:690c:4441:b0:727:637f:8729 with SMTP id
 00721157ae682-73065abc62amr52725917b3.44.1757758604965; Sat, 13 Sep 2025
 03:16:44 -0700 (PDT)
MIME-Version: 1.0
From: Chris <seahen123@HIDDEN>
Date: Sat, 13 Sep 2025 03:16:34 -0700
X-Gm-Features: Ac12FXzLFBexak4trJx5TI9or8QZp4XqAgtjpvSLYCKuoL1wBq54xEIbjmyLR9U
Message-ID: <CAPvCkbikc5FPmMGhBzVN3cxiBxLEUM7K_sgQDfQuO_QQeWqukA@HIDDEN>
Subject: `ln -s` should raise a warning about pwd-relative vs
 symlink-location-relative targets
To: bug-coreutils@HIDDEN
Content-Type: multipart/alternative; boundary="0000000000003ffbc8063eac117b"
Received-SPF: pass client-ip=2607:f8b0:4864:20::b32;
 envelope-from=seahen123@HIDDEN; helo=mail-yb1-xb32.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: When my current working directory is `/foo` and contains
 `bar`
 and I need `/example/bar` to be a symlink to `/foo/bar`, it seems intuitive
 that `ln -s bar /example/bar` should accomplish that. But it [...] 
 Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (seahen123[at]gmail.com)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (seahen123[at]gmail.com)
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
 0.0 HTML_MESSAGE           BODY: HTML included in message
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 14 Sep 2025 00:56:53 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

--0000000000003ffbc8063eac117b
Content-Type: text/plain; charset="UTF-8"

When my current working directory is `/foo` and contains `bar` and I need
`/example/bar` to be a symlink to `/foo/bar`, it seems intuitive that `ln
-s bar /example/bar` should accomplish that. But it doesn't; instead it
makes `/example/bar` a symlink that points to itself, because `ln -s` makes
relative paths relative to the symlink's location rather than (like all
other coreutils commands I know of) relative to the current directory.

It seems to me it should be easy enough to alert users to this gotcha by
printing a warning to stderr when creating a symlink whose location is an
absolute path and whose target isn't. But not only doesn't that warning
occur, but there isn't even an entry for it at
https://www.pixelbeat.org/docs/coreutils-gotchas.html. This sort of thing
seems to me to be a likely huge turnoff for non-technical people who might
otherwise be using Linux on the desktop. Can we please implement this
warning?

Sincerely,
Chris Hennick

--0000000000003ffbc8063eac117b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>When my current working directory is `/foo` and conta=
ins `bar` and I need `/example/bar` to be a symlink to `/foo/bar`, it seems=
 intuitive that `ln -s bar /example/bar` should accomplish that. But it doe=
sn&#39;t; instead it makes `/example/bar` a symlink that points to itself,=
=C2=A0because `ln -s` makes relative=C2=A0paths relative to the symlink&#39=
;s location rather than (like all other coreutils commands I know of) relat=
ive to the current directory.</div><div><br></div><div>It seems to me it sh=
ould be easy enough to alert users to this gotcha by printing a warning to =
stderr when creating a symlink whose location is an absolute path and whose=
 target isn&#39;t. But not=C2=A0only doesn&#39;t that warning occur, but th=
ere isn&#39;t even an entry for it at=C2=A0<a href=3D"https://www.pixelbeat=
.org/docs/coreutils-gotchas.html">https://www.pixelbeat.org/docs/coreutils-=
gotchas.html</a>. This sort of thing seems to me to be a likely huge=C2=A0t=
urnoff for non-technical people who might otherwise be using Linux on the d=
esktop. Can we please implement=C2=A0this warning?</div><div><br></div><div=
><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signatu=
re"><div dir=3D"ltr"><div><div dir=3D"ltr"><div>Sincerely,<br>Chris Hennick=
</div></div></div></div></div></div></div>

--0000000000003ffbc8063eac117b--




Acknowledgement sent to Chris <seahen123@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#79445; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 15 Sep 2025 03:30:05 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.