Rich Freeman via plug on 1 May 2021 05:47:50 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Mounting /usr/share vs symlinking


On Sat, May 1, 2021 at 7:23 AM Walt Mankowski via plug
<plug@lists.phillylinux.org> wrote:
>
> But *why* did it work? Why do man and file (and presumably other
> commands I hadn't discovered yet) care if their data files are mounted
> or symlinked?
>

So, I can't speak to WHY it matters, but there are definitely a few
programs out there (including some important ones) which break if some
paths in /usr or /var are symlinks.  I've done installs across
partitions and I usually bind-mount or direct-mount stuff in these
areas for this reason.

I don't get why it happens with something like file trying to read its
data files.  I could see why it would be an issue for software that
traverses around directory trees where it might start at some point
and then start going into parent directories and thus end up outside
of /usr or wherever it was supposed to think it was.  Maybe config
files that set a base path and then relative paths for various things
that contain ".." in them could be an issue.  However, I found that it
breaks stuff that you wouldn't think of as doing these sorts of
things.

It has been MANY years since I tried to symlink /usr or /var so I
don't remember exactly what broke.

(Yes, I realize you didn't symlink /usr itself, but I suspect it is
the same sort of issue.)

-- 
Rich
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug