From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#13298: 24.3.50; Cannot write backup file; backing up in ~\.emacs.d\%backup%~ Date: Sat, 29 Dec 2012 16:44:34 +0200 Message-ID: <83bodclxyl.fsf@gnu.org> References: <87zk0xnc0f.fsf@yandex.ru> <83zk0xl4cv.fsf@gnu.org> <50DED342.7040901@yandex.ru> <83ip7lkqp6.fsf@gnu.org> <50DEF35F.9090107@yandex.ru> <83d2xtklu1.fsf@gnu.org> <50DEF66E.4020106@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1356792309 5782 80.91.229.3 (29 Dec 2012 14:45:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Dec 2012 14:45:09 +0000 (UTC) Cc: 13298@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 29 15:45:25 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Toxf8-00056p-CM for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Dec 2012 15:45:22 +0100 Original-Received: from localhost ([::1]:58591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Toxet-0004pO-PW for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Dec 2012 09:45:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Toxer-0004oD-6K for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 09:45:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Toxep-0002MS-Rk for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 09:45:04 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Toxep-0002Ly-Oc for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 09:45:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Toxfm-0007Js-3Q for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 09:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Dec 2012 14:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13298 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13298-submit@debbugs.gnu.org id=B13298.135679233228100 (code B ref 13298); Sat, 29 Dec 2012 14:46:01 +0000 Original-Received: (at 13298) by debbugs.gnu.org; 29 Dec 2012 14:45:32 +0000 Original-Received: from localhost ([127.0.0.1]:35782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ToxfI-0007J9-BA for submit@debbugs.gnu.org; Sat, 29 Dec 2012 09:45:32 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:34610) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ToxfC-0007Ix-Pq for 13298@debbugs.gnu.org; Sat, 29 Dec 2012 09:45:28 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MFS00I00RH8IO00@a-mtaout22.012.net.il> for 13298@debbugs.gnu.org; Sat, 29 Dec 2012 16:44:25 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MFS00IMSRM186A0@a-mtaout22.012.net.il>; Sat, 29 Dec 2012 16:44:25 +0200 (IST) In-reply-to: <50DEF66E.4020106@yandex.ru> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69156 Archived-At: > Date: Sat, 29 Dec 2012 17:55:58 +0400 > From: Dmitry Gutov > CC: 13298@debbugs.gnu.org > > On 29.12.2012 17:51, Eli Zaretskii wrote: > >> Date: Sat, 29 Dec 2012 17:42:55 +0400 > >> From: Dmitry Gutov > >> CC: 13298@debbugs.gnu.org > >> > >>> Can you step with a debugger (e.g., Edebug) through > >>> backup-buffer-copy, and see why it errors out? My crystal ball says > >>> it happens because of set-file-extended-attributes, in which case > >>> please tell what is the value of extended-attributes argument passed > >>> to backup-buffer-copy. > >> > >> Indeed, it happens after a call to set-file-acl. > >> > >> ((acl . > >> "O:BAG:S-1-5-21-909999172-181315677-756075521-513D:(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;S-1-5-21-909999172-181315677-756075521-1000)") > >> (selinux-context nil nil nil nil)) > > > > And if, before the call to set-file-acl inside > > set-file-extended-attributes, you evaluate the expression > > > > (file-acl filename) > > > > what does it return? > > "O:S-1-5-21-909999172-181315677-756075521-1000G:S-1-5-21-909999172-181315677-756075521-513D:(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;S-1-5-21-909999172-181315677-756075521-1000)" I guess this happens because all of the following: . your user is a local Administrator . you took ownership of your ~/.emacs.d directory, instead of leaving it owned by the Administrators group . you didn't (or cannot) enable the "take ownership" privilege in your local security policy Because of this, the files created inside ~/.emacs.d inherit the owner of that directory, i.e. your user-id, while the original file that is being backed up had the Administrators group as its owner (that's what the "O:BA" part above means). And because you don't have the privileges of taking ownership, the call to set-file-acl fails. I installed as trunk revision 111369 a set of changes that should fix this for you. Please test. (I could only approximate the problem on my machine, so I cannot be sure the changes indeed fix it.)