Sascha Wilde <[EMAIL PROTECTED]> writes:

> The file /path/to/example on host bob is owned by root.foo
> visiting it from another host as /ssh:[EMAIL PROTECTED]:/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

*** /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
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to