From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: tramp (2.0.52); Saving files changes ownership Date: Fri, 19 Oct 2007 05:48:17 +0200 Message-ID: <87ejfrn4se.fsf@gmx.de> References: <43E271C6.8030901@emptydomain.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1192765435 15895 80.91.229.12 (19 Oct 2007 03:43:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2007 03:43:55 +0000 (UTC) Cc: tramp-devel@gnu.org, Kai =?iso-8859-15?Q?Gro=DFjohann?= , emacs-devel@gnu.org To: Sascha Wilde Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 19 05:43:53 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iiim7-000256-Uf for ged-emacs-devel@m.gmane.org; Fri, 19 Oct 2007 05:43:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iiim0-0007Ik-FE for ged-emacs-devel@m.gmane.org; Thu, 18 Oct 2007 23:43:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iiilo-0007CN-O5 for emacs-devel@gnu.org; Thu, 18 Oct 2007 23:43:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iiilm-00079i-Ra for emacs-devel@gnu.org; Thu, 18 Oct 2007 23:43:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iiilm-00079Z-NX for emacs-devel@gnu.org; Thu, 18 Oct 2007 23:43:30 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Iiilm-0002Wy-8m for emacs-devel@gnu.org; Thu, 18 Oct 2007 23:43:30 -0400 Original-Received: (qmail invoked by alias); 19 Oct 2007 03:43:28 -0000 Original-Received: from p57A21D51.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.29.81] by mail.gmx.net (mp029) with SMTP; 19 Oct 2007 05:43:28 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/ABPIKP9nAIP+KVtLo+BHRkg4VB6ncDXBcS9zmwi BYnjxtSaZ2n041 In-Reply-To: (Sascha Wilde's message of "Thu, 18 Oct 2007 18:15:28 +0200") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81182 Archived-At: --=-=-= Sascha Wilde 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment *** /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 --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--