From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lowell Gilbert Newsgroups: gmane.emacs.help Subject: Re: File ownership changes with save Date: Wed, 22 Aug 2007 16:35:55 -0400 Message-ID: <443aybmhn8.fsf@be-well.ilk.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1187815298 19058 80.91.229.12 (22 Aug 2007 20:41:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2007 20:41:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 22 22:41:36 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1INx1B-0004PY-GW for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Aug 2007 22:41:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INx1B-0007Tz-54 for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Aug 2007 16:41:33 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Wed, 22 Aug 2007 15:35:55 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.99 (berkeley-unix) Cancel-Lock: sha1:/o778Oh9pt8PJucM+3jxi2BA82Q= Original-Lines: 37 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 66.92.78.145 Original-X-Trace: sv3-eCs2iMIfC8GFVyIhuDw2eu3Y1T5UfLI0tHQwsSqFiPrLGaexAhJ6+W5djhzGuKCVaiRdUV1u2sDPq0S!dJ80VfUtFtq08M8rbDPWldnj29jbBZntkIM/hdsPuzn/pwpDS6Ivi7PL2swXBvb+1MREf0RYwANu!CH9o1bnAsw== Original-X-Complaints-To: abuse@speakeasy.net X-DMCA-Complaints-To: abuse@speakeasy.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Original-Xref: shelby.stanford.edu gnu.emacs.help:151190 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46763 Archived-At: arguellodw writes: > When I edit and save a file that is owned by somebody else, emacs gives me > ownership of the newly edited file (say file1.dat) and retains ownership of > the backup file (file1.dat~) for the original owner. > > How do I configure emacs to give ownership of the new file to the original > owner? I'd suggest setting `backup-by-copying-when-mismatch'. I got the information from the documentation for make-backup-files: make-backup-files is a variable defined in `files.el'. Its value is t Documentation: Non-nil means make a backup of a file the first time it is saved. This can be done by renaming the file or by copying. Renaming means that Emacs renames the existing file so that it is a backup file, then writes the buffer into a new file. Any other names that the old file had will now refer to the backup file. The new file is owned by you and its group is defaulted. Copying means that Emacs copies the existing file into the backup file, then writes the buffer on top of the existing file. Any other names that the old file had will now refer to the new (edited) file. The file's owner and group are unchanged. The choice of renaming or copying is controlled by the variables `backup-by-copying', `backup-by-copying-when-linked', `backup-by-copying-when-mismatch' and `backup-by-copying-when-privileged-mismatch'. See also `backup-inhibited'. You can customize this variable.