From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov 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 22:33:04 +0400 Message-ID: <50DF3760.7060500@yandex.ru> 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> <83bodclxyl.fsf@gnu.org> <50DF14C3.6040702@yandex.ru> <83a9swlrp7.fsf@gnu.org> <50DF25FE.3010900@yandex.ru> <83623klqdc.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1356806061 15398 80.91.229.3 (29 Dec 2012 18:34:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Dec 2012 18:34:21 +0000 (UTC) Cc: 13298@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 29 19:34:35 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 1Tp1Eo-0002bI-T7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Dec 2012 19:34:27 +0100 Original-Received: from localhost ([::1]:50095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tp1Ea-0005dt-5S for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Dec 2012 13:34:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tp1EU-0005de-BY for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 13:34:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tp1ER-0005Nf-J5 for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 13:34:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tp1ER-0005NZ-Es for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 13:34:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tp1FO-0006JK-FQ for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2012 13:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Dec 2012 18:35:02 +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.135680605024200 (code B ref 13298); Sat, 29 Dec 2012 18:35:02 +0000 Original-Received: (at 13298) by debbugs.gnu.org; 29 Dec 2012 18:34:10 +0000 Original-Received: from localhost ([127.0.0.1]:36353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tp1EX-0006IH-N2 for submit@debbugs.gnu.org; Sat, 29 Dec 2012 13:34:10 -0500 Original-Received: from mail-la0-f52.google.com ([209.85.215.52]:64961) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tp1EU-0006I8-Bl for 13298@debbugs.gnu.org; Sat, 29 Dec 2012 13:34:07 -0500 Original-Received: by mail-la0-f52.google.com with SMTP id fq12so2331339lab.11 for <13298@debbugs.gnu.org>; Sat, 29 Dec 2012 10:33:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=cz+wnl1OvffNV4aggzQbyiPonBHf8davHoK/rZS+TzI=; b=G+bnOFmRmIpw5Xje0db1LTDduHqND89kjj3BhUlLsCZsVrfV28CoOwH08+t6oSnJPf KueeZ9mpHO9Uh0IRGKX3X6BMdQF9y5ibkrclH6HqD3EKcPAsmK4RA+GHAnE3cflpD4Ca mhHIj3Aj1+sJGwAehF5vsjRPTA8SZOuBmXfETFpJOT+sRIleenWjwtkqQjraW06tnjrL PAU6C6BWsj/FnlRXBgoIKHFQFS7ut48ysMgp9fPp64/tXurcuE+hW4RjSeNYdwkp8XE8 j5u6YZwZUd00YXA5Lp32UOcQCKf0xc/26iika50FB+wVJvH06uUZZq9Qbsd7zmOl6Vh+ DTDw== X-Received: by 10.112.10.200 with SMTP id k8mr7417708lbb.73.1356805985486; Sat, 29 Dec 2012 10:33:05 -0800 (PST) Original-Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id ns7sm12336258lab.5.2012.12.29.10.33.03 (version=SSLv3 cipher=OTHER); Sat, 29 Dec 2012 10:33:04 -0800 (PST) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <83623klqdc.fsf@gnu.org> 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:69167 Archived-At: On 29.12.2012 21:28, Eli Zaretskii wrote: >> Why doesn't Emacs try to show the elevation dialog, anyway? > > The elevation dialog comes from Windows, when it does. Applications > don't show it, they just can trigger it by performing operations that > require elevation. But UAC behaves strangely when Administrators are > involved. I'm not familiar with Windows API, but I think there's a specific way to request the elevation. For example, foobar2000 installer starts up normally, but shows the elevation dialog when you click on the "Update" button, with the same standard shield icon as in Explorer. >>>> Like I described, I don't think my situation is exceptional, so seeing >>>> the error messages is misleading. >>> >>> Why misleading? We asked Emacs to preserve the ACLs of the original >>> file, and it couldn't. Shouldn't the user be informed about that? >> >> It leads me to believe that there's either something wrong with my >> system, or Emacs configuration, whereas I don't know why I should care >> that the backup function doesn't correctly set the file ownership. > > You could try taking care of this issue by manually taking ownership > of the C:\Users\Gutov directory and all of its files and > subdirectories. Setting the owner of C:\Users\Gutov to either your > user or the Administrators group will probably resolve the problem. Changing the owner of the directory itself didn't do it (I didn't check "replace on all subcontainers"), but changing the owner of each problematic file did it. Thanks! > Doing the former, i.e. setting your user as the owner, sounds like TRT > to me anyway, it doesn't make sense to me to have SYSTEM as an owner. If the owner is Administrators, the error is the same, so SYSTEM is not the problem here. >>> If you think this is bad behavior, lobby on emacs-devel to allow some >>> kind of user options for ignoring these errors (which means you don't >>> care about security of access to your files). >> >> I don't think that a user option is the way to go if it's going to be >> off by default. >> >> Maybe don't expect the user to customize its value, and bind it to t in >> certain functions, like backup-buffer-copy, instead? > > I will let others answer that. To expand on this idea, if you were to get elevation to work, the variable would control whether you would show the user the elevation dialog if they have insufficient rights, or just fail silently. I can't imagine, for example, anyone thinking that showing the elevation dialog (or several) during Emacs shutdown is a good idea. But if I'm a security-conscious Windows user, a) I'm not going to run Emacs "As Administrator", b) If I'm assigning access rights to a file, I'd prefer to see the elevation dialog instead of just the error message.