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 20:05:23 +0400 [thread overview]
Message-ID: <50DF14C3.6040702@yandex.ru> (raw)
In-Reply-To: <83bodclxyl.fsf@gnu.org>
On 29.12.2012 18:44, Eli Zaretskii wrote:
>> Date: Sat, 29 Dec 2012 17:55:58 +0400
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> 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 <dgutov@yandex.ru>
>>>> 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
The above is true. But /Users/gutov is owned by SYSTEM, FWIW.
> . you didn't (or cannot) enable the "take ownership" privilege in
> your local security policy
This policy's security setting says "Administrators", and my user
belongs to that group (I'm looking in Local Policies/User Rights
Assignment, is that right?).
If I want to change the ownership, I open the Advanced Security Settings
window, switch to the Owner tab, and the Edit button has the "security
shield" button on it, which I can click, the edit window opens, I can
make changes and save. All this without logging in as a different user,
or even seeing the UAC prompt (in Windows Explorer).
Third-party applications might need a UAC prompt for that, I imagine.
> 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.)
It's better, but now I see these messages:
Saving file c:/Users/gutov/.newsrc...
Error: (file-error "Setting ACL" "operation not permitted"
"c:/Users/gutov/.emacs.d/backups/!drive_c!Users!gutov!.newsrc~")
Wrote c:/Users/gutov/.newsrc
Saving c:/Users/gutov/.newsrc.eld...
Saving file c:/Users/gutov/.newsrc.eld...
Error: (file-error "Setting ACL" "operation not permitted"
"c:/Users/gutov/.emacs.d/backups/!drive_c!Users!gutov!.newsrc.eld~")
Wrote c:/Users/gutov/.newsrc.eld
Saving c:/Users/gutov/.newsrc.eld...done
Like I described, I don't think my situation is exceptional, so seeing
the error messages is misleading.
next prev parent reply other threads:[~2012-12-29 16:05 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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50DF14C3.6040702@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.