unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 13298@debbugs.gnu.org
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	[thread overview]
Message-ID: <50DF3760.7060500@yandex.ru> (raw)
In-Reply-To: <83623klqdc.fsf@gnu.org>

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.





  reply	other threads:[~2012-12-29 18:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-28 20:43 bug#13298: 24.3.50; Cannot write backup file; backing up in ~\.emacs.d\%backup%~ Dmitry Gutov
2012-12-29  7:11 ` Eli Zaretskii
2012-12-29 11:25   ` Dmitry Gutov
2012-12-29 12:06     ` Eli Zaretskii
2012-12-29 13:42       ` Dmitry Gutov
2012-12-29 13:51         ` Eli Zaretskii
2012-12-29 13:55           ` Dmitry Gutov
2012-12-29 14:44             ` Eli Zaretskii
2012-12-29 16:05               ` Dmitry Gutov
2012-12-29 16:59                 ` Eli Zaretskii
2012-12-29 17:18                   ` Dmitry Gutov
2012-12-29 17:28                     ` Eli Zaretskii
2012-12-29 18:33                       ` Dmitry Gutov [this message]
2012-12-29 19:11                         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50DF3760.7060500@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=13298@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).