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: Thu, 10 Jul 2025 08:09:56 +0200

Richard Stallman <[email-masked]> writes:

Hi Richard,

>   > Tramp could write a local temporary file, transfer it to a remote
>   > temporary file, and rename the remote temporary file to the intended
>   > file name. But this would require an additional step, which will be not
>   > acceptable for performance reasons.
>
> You may be right about that, but directly writing the requested remote
> file name will tend to cause various problems, such as the one you're
> trying to fix here.
>
>   > Note, that the root case of this bug was Tramp calling chmod, not the
>   > copying action itself. Annoying, but not the end of the word.
>
> I understand, but other problems can occur -- for instance, if writing
> the remote output file fails, that file can be left in a broken state,
> or perhaps absent entirely.

Could be.

However, Tramp is very careful about this. Over the last 20+ years, I do
not remember any report about data loss due to Tramp.

Best regards, Michael.