From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Schierl Newsgroups: gmane.emacs.bugs Subject: Re: backup-buffer-copy loops if old backup can't be deleted Date: Wed, 22 Aug 2007 23:37:48 +0200 Message-ID: References: <46CAD810.3050904@gmx.net> <46CAF8AC.9070809@gmx.at> <46CAFBEF.2040606@gmx.net> <46CB529F.7010008@gmx.at> <16sl6cy2t8.fsf@fencepost.gnu.org> <46CBFE2E.9050606@gmx.net> <46CC056C.5030603@gmx.at> <46CC0679.8040003@gmx.net> Reply-To: schierlm@gmx.de NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1187820358 3698 80.91.229.12 (22 Aug 2007 22:05:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2007 22:05:58 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 23 00:05:56 2007 Return-path: Envelope-to: geb-bug-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 1INyKB-0001IG-Qc for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Aug 2007 00:05:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INyKB-0005Ti-9q for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2007 18:05:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1INyK8-0005TI-Uo for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2007 18:05:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1INyK6-0005T5-Hp for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2007 18:05:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INyK6-0005T2-CQ for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2007 18:05:10 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1INyK5-0004we-Tn for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2007 18:05:10 -0400 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1INyJy-0008A1-U7 for bug-gnu-emacs@gnu.org; Thu, 23 Aug 2007 00:05:02 +0200 Original-Received: from p549bab90.dip0.t-ipconnect.de ([84.155.171.144]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Aug 2007 00:05:02 +0200 Original-Received: from schierlm by p549bab90.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Aug 2007 00:05:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p549bab90.dip0.t-ipconnect.de User-Agent: 40tude_Dialog/2.0.14.1 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16423 Archived-At: On Wed, 22 Aug 2007 11:48:41 +0200, Martin von Gagern wrote: > martin rudalics wrote: >> We could check (file-writable-p to-name) here too. > > And how would you combine the results? There are filesystems where I can > delete a file even if I can't write it. And, on lots of filesystems there are directories where you can write a file and its directory but still not delete the file. At least on GNU/Linux (I don't know which "half" is responsible for it), you can set a directory to "sticky" (commonly used on /tmp) which means that only the owner (of the file) can delete files in there. | STICKY DIRECTORIES | When the sticky bit is set on a directory, files in that directory may | be unlinked or renamed only by root or their owner. Without the sticky | bit, anyone able to write to the directory can delete or rename files. | The sticky bit is commonly found on directories, such as /tmp, that are | world-writable. Michael -- #!/usr/bin/perl -I' # tekscribble.pl - start in an xterm and scribble with mouse $|=1;$g="\35";sub g{getc}sub p{print@_}system"stty -icanon";p"\233?38h";for(;;){ p"$g\33\32";$_=g;$x=g;$X=g;$y=g;$Y=g;last if/q/;$k=$y.chr((ord$Y)+64).$x.chr(( ord$X)+32);p"\33\14"if/c/;p$g.(/ì/?$l:$k).$k;$l=$k;}p"\33\3";system"stty icanon"