all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jo Vermeulen <jo.vermeulen@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 7289@debbugs.gnu.org
Subject: bug#7289: Tramp changes ownership of remote file when saving
Date: Wed, 27 Oct 2010 17:21:45 +0200	[thread overview]
Message-ID: <AANLkTi=sTcodv14keDU7WDNW2aziStFCN2H=bsFjTA9E@mail.gmail.com> (raw)
In-Reply-To: <jwvhbg7lp2h.fsf-monnier+emacs@gnu.org>

On Wed, Oct 27, 2010 at 3:53 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> When editing a remote file over SSH using tramp, emacs changes the ownership
>> of the file. I was logged in as root, and the file had ownership svn:svn.
>> After saving, however, emacs changed the ownership to root:root. The backup
>> file (filename~) did have the user/group settings however.
>
> What are your settings for backup-by-copying and
> backup-by-copying-when-mismatch?

C-h-v backup-by-coping gives me:

"backup-by-copying's value is nil"

Which, I assume, means that Emacs might use renaming for backups.

And C-h-v backup-by-coping-when-mismatch results in:

"backup-by-copying-when-mismatch's value is nil"

I guess if this value would be non-nil, my problem would be solved?

Additionally, C-h-v backup-by-copying-when-privileged-mismatch gives me:

"backup-by-copying-when-privileged-mismatch's value is 200"

I just toggled backup-by-copying-when-mismatch and tried it again, and
indeed, it does work now.

I'm just wondering if this means that the default behavior is broken?
It seems Emacs automatically sets backup-by-copying-when-mismatch to t
when it is run by the superuser (root) to overcome this problem
(source: http://www.delorie.com/gnu/docs/emacs/emacs_117.html).

I don't think many people will run Emacs as root in this day and age.
However, they might log in as root on a remote server, or edit a file
as root (using sudo/su). Maybe Emacs or Tramp should also
automatically set the backup-by-copying-when-mismatch variable to t in
those cases?

Thanks for your help!

Cheers,

-- Jo





  reply	other threads:[~2010-10-27 15:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 10:46 bug#7289: Tramp changes ownership of remote file when saving Jo Vermeulen
2010-10-27 13:53 ` Stefan Monnier
2010-10-27 15:21   ` Jo Vermeulen [this message]
2010-10-28 12:37     ` Michael Albinus
2010-10-29 10:42       ` Jo Vermeulen
2010-10-29 11:25         ` Michael Albinus
2010-10-29 13:28           ` Jo Vermeulen
2010-10-29 19:31             ` Michael Albinus
2010-10-31 19:15       ` Stefan Monnier
2010-11-01  7:33         ` Michael Albinus
2010-11-01 14:12           ` backup-by-copying-when-mismatch (was: bug#7289: Tramp changes ownership of remote file when saving) Stefan Monnier
2010-11-04 14:51             ` backup-by-copying-when-mismatch Michael Albinus
2010-11-20 10:49               ` backup-by-copying-when-mismatch Michael Albinus
2010-11-21 17:16                 ` backup-by-copying-when-mismatch Stefan Monnier
2010-11-21 19:48                   ` backup-by-copying-when-mismatch Michael Albinus

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=sTcodv14keDU7WDNW2aziStFCN2H=bsFjTA9E@mail.gmail.com' \
    --to=jo.vermeulen@gmail.com \
    --cc=7289@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.