Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Oct 2022 10:59:57 +0200
From:      Andreas Kusalananda =?utf-8?B?S8OkaMOkcmk=?= <andreas.kahari@abc.se>
To:        Paul Procacci <pprocacci@gmail.com>
Cc:        Aryeh Friedman <aryeh.friedman@gmail.com>, FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Fwd: mkdir error message -- what does this mean?
Message-ID:  <YzgBjWeh1LgX0cLD@harpo.local>
In-Reply-To: <CAFbbPujLJXR6u3ybugka=6w=b_=qYR0CxoR3hPC70cgU9vMAUw@mail.gmail.com>
References:  <e293b9c3b1c168ad1eee3a65510b1aa9@nyclocal.net> <CAGBxaXnc_ornipZxX=NgoDagCjcU80vMXZ1EjZr8j-8RrcdJnw@mail.gmail.com> <Yzc44MPka/dFNEL1@harpo.local> <CAFbbPujLJXR6u3ybugka=6w=b_=qYR0CxoR3hPC70cgU9vMAUw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 01, 2022 at 02:38:09AM -0400, Paul Procacci wrote:
> On Fri, Sep 30, 2022 at 2:44 PM Andreas Kusalananda Kähäri <
> andreas.kahari@abc.se> wrote:
> 
> > On Fri, Sep 30, 2022 at 02:35:14PM -0400, Aryeh Friedman wrote:
> > > ---------- Forwarded message ---------
> > > From: Dee Nixon <dnixon-fnwe@nyclocal.net>
> > > Date: Fri, Sep 30, 2022 at 11:31 AM
> > > Subject: mkdir error message -- what does this mean?
> > > To: Aryeh Friedman <aryeh.friedman@gmail.com>
> > >
> > >
> > >
> > > What does the following mean?
> > >
> > >
> > > dnixon@sft:/tmp % sudo mkdir
> > > /fsvc/clients/specMed/LIVE/master/h11a9fpp-mkknhbci-2hjvbpc
> > > mkdir: /fsvc/clients/specMed/LIVE/master/h11a9fpp-mkknhbci-2hjvbpc: Too
> > > many links
> > > dnixon@sft:/tmp %
> > >
> > > --
> > >
> > >
> > > --
> > > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> >
> >
> > The error message usually says "Too many levels of symbolic links", so
> > I'm assuming that you have translated it.
> >
> > It means that when creating the directory, a symbolic link was traversed
> > that pointed back to itself, or in some other fasion created a loop.
> >
> > This can easily be recreated like this:
> >
> >         $ ln -s link .
> >         $ ls -l
> >         total 1
> >         lrwxr-xr-x  1 myself  wheel  4 Sep 30 20:38 link -> link
> >
> > Then:
> >
> >         $ mkdir link/hello
> >         mkdir: link/hello: Too many levels of symbolic links
> >
> > So, in your case, I would investigate whether any part of the target
> > pathname "/fsvc/clients/specMed/LIVE/master/h11a9fpp-mkknhbci-2hjvbpc"
> > is a symbolic link that points to somewhere where it shouldn't point.
> >
> > --
> > Andreas (Kusalananda) Kähäri
> > SciLifeLab, NBIS, ICM
> > Uppsala University, Sweden
> >
> > .
> >
> >
> This was obviously incorrect as it wasn't a translation.  The error

Yes, it was incorrect.  This was entierly due to me assuming (too
quickly) that this was related to the much more common issue of
resolving self-referential symbolic links.

I'm aware how errno numbers and the associated messages work. This was,
as I said, due to me making assumptions that were not correct and not
double checking.

Cheers.

> messages that the standard FreeBSD utilities produce USUALLY provide you
> with a short message that errno points to.  It does this by way of "char
> *strerror(int errnum)" (man 3 strerror).
> All this says is, given an errno, provide me with an error string.
> 
> By taking that error string (or most of it) you can look up which errno was
> triggered.  If this was indeed a symbolic link error the actual error
> message would have been: "Too many levels of symbolic links" or errno
> 62/ELOOP.  (like you show'd)
> Taking the exact error message and looking that up instead, you'll find
> it's errno 31/EMLINK.
> 
> Early I provided this data and was asked by David how I found this
> information. I feel obligated to share it again here so in future finding
> maybe not the exact cause of the problem, but a more logical explanation
> for a given error can be made quicker:
> 
> man errno
> 
> The above command not only provides the "short" version of which error
> strings that utilities can produce, but also provides a slightly more
> detailed explanation (in most cases) about what a given errno means.
> It doesn't always nor can it provide you a definitive answer every single
> time, but in some cases it absolutely can.
> 
> Anyways, just tying up loose ends.
> 
> Thanks,
> Paul Procacci
> -- 
> __________________
> 
> :(){ :|:& };:

-- 
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden

.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YzgBjWeh1LgX0cLD>