Subject: bug#78638: 30.1; When editing a remote file owned by another user, Tramp signals an error because it cannot change the file mode

From: Michael Albinus <[email-masked]>
Date: Sun, 01 Jun 2025 18:42:16 +0200

Eli Zaretskii <[email-masked]> writes:

Hi,

>> I set the value of ‘backup-by-copying-when-privileged-mismatched’ to
>> 10000, and the error still occurs. I then set ‘backup-by-copying’ to
>> t, and the error still occurs. I checked the *Messages* buffer, and
>> it reports that Emacs is using copying for this file. This is
>> definitely an error in Tramp, not the result of proper Emacs
>> behavior.
>
> Thanks, I agree with your conclusion.
>
> Michael, could you please look into this?

Will do.

Michael: as a first step, I'd like to gather more information. Michael,
could you pls start a new Emacs session like this:

--8<---------------cut here---------------start------------->8---
# emacs -Q -l tramp --eval '(setq tramp-verbose 6 backup-by-copying t)'
--8<---------------cut here---------------end--------------->8---

Provoke the error on a remote host. Describe in detail, which steps you
have performed in order to see the error.

There will be a Tramp debug buffer. Pls send it as attachment here.

Best regards, Michael.