Subject: Re: bug#74400: 31.0.50; tramp-loaddefs.elc suddenly owned by root
From: Michael Albinus <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Tue, 19 Nov 2024 10:09:20 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

Hi Eli,

>> > No idea to be honest.  Let's not waste time and assume I made nonsense.
>> > I can reopen in case it comes back.
>>
>> Wait, I could reproduce the problem:
>>
>> --8<---------------cut here---------------start------------->8---
>> # rm lisp/net/tramp-loaddefs.elc
>> # sudo make install
>> # ll lisp/net/*loaddefs*
>> -rw-rw----+ 1 albinus albinus 110234 Nov 17 17:37 lisp/net/tramp-loaddefs.el
>> -rw-r--r--+ 1 root    root    122088 Nov 18 09:27 lisp/net/tramp-loaddefs.elc
>> --8<---------------cut here---------------end--------------->8---
>
> But note that here the time stamps of the two files are very diferent,
> which seems to indicate that tramp-loaddefs.el was somehow
> byte-compiled as part of "make install".  Whereas in the OP, we saw a
> different picture:
>
> |  /home/micha/software/emacs/lisp/net:
> |  drwxr-xr-x  2 micha micha 4,0K Nov 16 17:03 .
> |  drwxr-xr-x 28 micha micha  20K Nov 16 17:03 ..
> |  [...]
> |  -rw-rw-r--  1 micha micha 108K Nov 15 17:01 tramp-loaddefs.el
> |  -rw-r--r--  1 root  root  120K Nov 15 17:01 tramp-loaddefs.elc
>
> Look, ma: same time stamp.  Which seems to indicate they were both
> produced at the same time, so probably by the same command.

My example doesn't claim to be the recipe which happened to Michael. But
it shows, that 'sudo make install' could create root-owned files in the
build dir, and that's what this bug report is about.

I don't know whether it is important enough to change something. But we
should know (and document), that it could happen.

Best regards, Michael.