Subject: bug#74400: 31.0.50; tramp-loaddefs.elc suddenly owned by root

From: Stefan Kangas <[email-masked]>
Date: Thu, 2 Jan 2025 15:20:11 -0600

Eli Zaretskii <[email-masked]> writes:

>> From: Stefan Kangas <[email-masked]>
>> Date: Thu, 2 Jan 2025 14:13:31 -0600
>> Cc: [email-masked], [email-masked]
>>
>> Eli Zaretskii <[email-masked]> writes:
>>
>> >> From: Michael Albinus <[email-masked]>
>> >> Cc: [email-masked],  [email-masked]
>> >> Date: Tue, 19 Nov 2024 10:09:20 +0100
>> >>
>> >> 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.
>> >
>> > If it's important enough, maybe.
>> >
>> > I think "make install" uses chmod to give everyone access to the file
>> > because some files could be owned by root.  If that works, why is the
>> > ownership important?
>>
>> Does everyone get write rights, though?  If not, how can you run
>> commands like "git clean -fxd" as a regular root after "make install"?
>
> Sorry, I don't follow: "make install" writes to the installation
> directory, and invokes chmod on the files installed there, whereas
> "git clean -fxd" is run on the Git repository, which is a different
> directory entirely.  What am I missing?

AFAIU, the issue here is that "sudo make install" can create root-owned
files in the build directory.