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
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi Michael,
As you suggested, setting tramp-inhibit-errors-if-setting-file-attributes-fail to t solved the problem. Thank you for this information!
However, I think the best long-term solution would be to fix Tramp so as not to make this step necessary. Perhaps a check could be added so that the chmod command is not run unless the remote file is owned by the user?
I set up the same situation on my local machine, and the error does not occur locally. I tried it with backup-by-copying set to both nil and t, and in neither case do I get the error.
My local machine is running MacOS, whereas the remote machine is running Ubuntu, so that may have something to do with the difference.
— Michael McClennen
On Jun 12, 2025, at 5:24 AM, Michael Albinus <michael.albinus <at> gmx.de<mailto:michael.albinus <at> gmx.de>> wrote:
Since Emacs 30.1, there is the user option
tramp-inhibit-errors-if-setting-file-attributes-fail. See (info "(tramp)
Frequently Asked Questions")
--8<---------------cut here---------------start------------->8---
• How to ignore errors when changing file attributes?
Sometimes, for example while saving remote files, errors appear
when changing file attributes like permissions, time stamps, or
ownership. If these errors can be ignored, set user option
‘tramp-inhibit-errors-if-setting-file-attributes-fail’ to a
non-‘nil’ value. This transforms the error into a warning.
--8<---------------cut here---------------end--------------->8---
[Message part 2 (text/html, inline)]
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.