From: Michael Albinus <michael.albinus@gmx.de>
To: Sascha Wilde <wilde@intevation.de>
Cc: tramp-devel@gnu.org, "Kai Großjohann" <kai@emptydomain.de>,
emacs-devel@gnu.org
Subject: Re: tramp (2.0.52); Saving files changes ownership
Date: Fri, 19 Oct 2007 05:48:17 +0200 [thread overview]
Message-ID: <87ejfrn4se.fsf@gmx.de> (raw)
In-Reply-To: <s7wodew8km7.fsf@intevation.de> (Sascha Wilde's message of "Thu, 18 Oct 2007 18:15:28 +0200")
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
Sascha Wilde <wilde@intevation.de> writes:
> The file /path/to/example on host bob is owned by root.foo
> visiting it from another host as /ssh:root@bob:/path/to/example
> editing and saving leads to it being owned by root.root.
>
> I have backup-by-copying set to t.
>
> Any Ideas?
Tramp 2.1.11 respects now the parameter PRESERVE-UID-GID of `copy-file'.
Does the following patch (files.el in Emacs trunk) help?
> cheers
> sascha
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1109 bytes --]
*** /home/albinus/src/emacs/lisp/files.el 2007-10-19 05:37:45.000000000 +0200
--- /home/albinus/src/emacs/lisp/files.el.~1.935.~ 2007-10-18 22:42:53.000000000 +0200
***************
*** 3204,3216 ****
(set-default-file-modes ?\700)
(when (condition-case nil
;; Try to overwrite old backup first.
! (copy-file from-name to-name t t t)
(error t))
(while (condition-case nil
(progn
(when (file-exists-p to-name)
(delete-file to-name))
! (copy-file from-name to-name nil t t)
nil)
(file-already-exists t))
;; The file was somehow created by someone else between
--- 3204,3216 ----
(set-default-file-modes ?\700)
(when (condition-case nil
;; Try to overwrite old backup first.
! (copy-file from-name to-name t t)
(error t))
(while (condition-case nil
(progn
(when (file-exists-p to-name)
(delete-file to-name))
! (copy-file from-name to-name nil t)
nil)
(file-already-exists t))
;; The file was somehow created by someone else between
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2007-10-19 3:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <s7wzmla82qx.fsf@thetis.hq>
[not found] ` <43E271C6.8030901@emptydomain.de>
[not found] ` <s7wirrwvom1.fsf@thetis.hq>
2007-10-18 16:15 ` tramp (2.0.52); Saving files changes ownership Sascha Wilde
2007-10-19 3:48 ` Michael Albinus [this message]
2007-10-19 7:47 ` Sascha Wilde
2007-10-21 11:01 ` Michael Albinus
2007-10-22 8:54 ` Sascha Wilde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ejfrn4se.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=kai@emptydomain.de \
--cc=tramp-devel@gnu.org \
--cc=wilde@intevation.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).