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

Previous Next

Package: emacs;

Reported by: Michael McClennen <mmcclenn <at> geology.wisc.edu>

Date: Thu, 29 May 2025 21:10:02 UTC

Severity: normal

Found in version 30.1

Full log


Message #23 received at 78638 <at> debbugs.gnu.org (full text, mbox):

From: Michael McClennen <mmcclenn <at> geology.wisc.edu>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>,
 "78638 <at> debbugs.gnu.org" <78638 <at> debbugs.gnu.org>
Subject: Re: bug#78638: 30.1; When editing a remote file owned by another
 user, Tramp signals an error because it cannot change the file mode
Date: Wed, 11 Jun 2025 23:24:32 +0000
[Message part 1 (text/plain, inline)]
Hello Michael,

I have done as you asked. Here are the steps I took, in detail:

1. Run emacs with the arguments listed below.
2. Hit c-x c-f.
3. Opened the file “/scp:taphonomy:/var/paleobiodb/frontend/pbdb-app/collections/collections.html”. The file is owned by somebody else, but its mode bits allow me to edit it.
4. Made a single change to the file.
5. Hit c-x c-s.
6. Heard a beep
7. The minibuffer displays the error message "File error: Error while changing file’s mode /scp:taphonomy:/var/paleobiodb/frontend/pbdb-app/collections/collections.html”
8. Hit c-x c-s again.
9. The minibuffer displays the message "collections.html has changed since visited or saved.  Save anyway? (yes or no) “. This is erroneous, since the file has not in fact changed on disk since I saved it a moment ago.
10. Hit c-x c-f
11. Opened the same file again. Verified that the single change I made was saved to disk, and no other changes were made to the file.

I have attached the contents of the buffer *debug tramp/scp taphonomy*

I hope this helps. Thank you for responding to this issue!

  — Michael McClennen



> On Jun 1, 2025, at 11:42 AM, Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> Eli Zaretskii <eliz <at> gnu.org> 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.

[Message part 2 (text/html, inline)]
[emacs-tramp-debug.txt (text/plain, attachment)]

This bug report was last modified 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.