From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: backup method Date: Sun, 30 Jan 2005 19:57:28 -0500 Message-ID: <874qgyxw24.fsf-monnier+emacs@gnu.org> References: <20050127000210.GA6167@boetes.org> <200501270045.j0R0jIq06197@raven.dms.auburn.edu> <20050127015432.GB6167@boetes.org> <20050128035618.GI6167@boetes.org> <20050129060851.GQ6167@boetes.org> <200501291842.j0TIgVw09020@raven.dms.auburn.edu> <20050129225259.GT6167@boetes.org> <87r7k3zti5.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1107133221 24144 80.91.229.6 (31 Jan 2005 01:00:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2005 01:00:21 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 31 02:00:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CvPvG-0008UA-00 for ; Mon, 31 Jan 2005 02:00:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvQ7s-0003eA-In for ged-emacs-devel@m.gmane.org; Sun, 30 Jan 2005 20:13:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CvQ7h-0003cT-SL for emacs-devel@gnu.org; Sun, 30 Jan 2005 20:13:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CvQ7d-0003aP-DZ for emacs-devel@gnu.org; Sun, 30 Jan 2005 20:12:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvQ7d-0003a2-7c for emacs-devel@gnu.org; Sun, 30 Jan 2005 20:12:57 -0500 Original-Received: from [209.226.175.4] (helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CvPsl-0004bl-UX; Sun, 30 Jan 2005 19:57:36 -0500 Original-Received: from alfajor ([67.71.119.71]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050131005735.HGCV1836.tomts16-srv.bellnexxia.net@alfajor>; Sun, 30 Jan 2005 19:57:35 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 51F7ED7344; Sun, 30 Jan 2005 19:57:28 -0500 (EST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sun, 30 Jan 2005 19:20:05 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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: main.gmane.org gmane.emacs.devel:32652 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32652 >> So I suggest not making backupfiles in world-writable directories. > This change would be a disastrous surprise. > (My home directory used to be world-writable. Maybe it still is, on > fencepost--I can't check from here.) In a world-writable directory, editing with a backup file is dangerous: - if backup-by-copying is t, then when writing the backup file we may follow a symlink (planted by some other user) to some important file. - if backup-by-copying is nil, the rename-file to create the backup is safe (as long as it doesn't do a copy behind the scenes, of course), but the main file will be written to in a way that will happily follow a symlink (planted by some other user) to some important file. Here are the possible answers I can think of: - who cares, we lived with it for so long already. - I trust other users not to try to play such nasty games. - don't make backups in world-writable directories (we already do that for the most common world-writable directory: /tmp). - take special precautions when making a backup in a world-writable directory (use make-temp-file & rename, for example, or save to some other place). Stefan