GNU bug report logs - #29455
backup-by-copying ACL Operation not permitted with Windows 7 and Samba

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Shuguang Sun <shuguang@HIDDEN>; dated Sun, 26 Nov 2017 15:00:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 29455 <at> debbugs.gnu.org:


Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 17:28:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 28 12:28:38 2017
Received: from localhost ([127.0.0.1]:34960 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eJjgU-0004DT-Nf
	for submit <at> debbugs.gnu.org; Tue, 28 Nov 2017 12:28:38 -0500
Received: from eggs.gnu.org ([208.118.235.92]:56379)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1eJjgT-0004DC-Np
 for 29455 <at> debbugs.gnu.org; Tue, 28 Nov 2017 12:28:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1eJjgJ-0006zM-H9
 for 29455 <at> debbugs.gnu.org; Tue, 28 Nov 2017 12:28:32 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49491)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1eJjgJ-0006zF-Ck; Tue, 28 Nov 2017 12:28:27 -0500
Received: from [176.228.60.248] (port=3182 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1eJjgI-0000s4-PD; Tue, 28 Nov 2017 12:28:27 -0500
Date: Tue, 28 Nov 2017 19:28:19 +0200
Message-Id: <83wp2a48jw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Shuguang Sun <shuguang@HIDDEN>
In-reply-to: <CACspjXchuHBsqThsQUWm4ZoAQgo=hVkzWFFv1p0FFhf++u=7_Q@HIDDEN>
 (message from Shuguang Sun on Tue, 28 Nov 2017 18:43:53 +0800)
Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with
 Windows 7 and Samba
References: <CACspjXcM1ZPKw7-q_GgV-6xUOqx2QQLRJEsATYFRRE49tKrmsg@HIDDEN>
 <83bmjp6kkt.fsf@HIDDEN>
 <CACspjXe7YPju_dZH8oR7F+v_zSmQJnGkF8JjrhKyTBDvWK1w7Q@HIDDEN>
 <83wp2b67nq.fsf@HIDDEN>
 <CACspjXchuHBsqThsQUWm4ZoAQgo=hVkzWFFv1p0FFhf++u=7_Q@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 29455
Cc: 29455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Shuguang Sun <shuguang@HIDDEN>
> Date: Tue, 28 Nov 2017 18:43:53 +0800
> Cc: 29455 <at> debbugs.gnu.org
> 
>  Thanks, but that's not what I asked.  I asked you to create a local
>  file (which I call "SOME-FILE" below, replace that with the actual
>  name of the file), and then type this inside Emacs:
> 
>    M-: (set-file-acl "SOME-FILE" "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)
>  (A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)") RET
> 
> It raises the same error message:
> (file-error "Setting ACL" "Operation not permitted" "c:/Users/username/Documents/base/subtitle.txt")
> 
> or
> eval: Setting ACL: Operation not permitted, c:/Users/username/HOME/.emacs.d/autosave/.bashrc.~1~

OK, I think I understand what causes this: the problem is with setting
the owner of the file to a user whose SID the local system doesn't
recognize, because it's not a local user.  If you omit the
O:S-1-22-1-79077G:S-1-22-2-108 part from the argument, the
set-file-acl call will most probably succeed.

I think that Emacs works correctly in this case: it tries to preserve
the ACLs of the original file in the backup file, and when that fails,
falls back to preserving only the read-write mode bits.  Your original
problem was caused by debug-on-error being non-nil, which shouldn't be
done except when debugging something.

I don't see how we could avoid showing the error message, because
Emacs cannot possibly know which user SID values are known to the
local system.  When you configure your backups of files from networked
drives to be stored on a local disk, you should realize that you run
the risk of having these problems with preserving extended
permissions.

So I think we see Emacs working as designed, and this bug should be
closed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29455; Package emacs. Full text available.

Message received at 29455 <at> debbugs.gnu.org:


Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 15:23:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 28 10:23:43 2017
Received: from localhost ([127.0.0.1]:34780 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eJhja-0007k2-Pm
	for submit <at> debbugs.gnu.org; Tue, 28 Nov 2017 10:23:43 -0500
Received: from mail-qk0-f176.google.com ([209.85.220.176]:42086)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <shuguang@HIDDEN>) id 1eJhjY-0007jo-Dn
 for 29455 <at> debbugs.gnu.org; Tue, 28 Nov 2017 10:23:40 -0500
Received: by mail-qk0-f176.google.com with SMTP id a71so226898qkc.9
 for <29455 <at> debbugs.gnu.org>; Tue, 28 Nov 2017 07:23:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=aPkkQqTtOIh00STuxmGzq7OTg5iXbphmw4rW7NDK6Jw=;
 b=P9tWnPJFTxRtKlYa9ak1GgOvtFR1dYR24AEh2PC8PfoQJabmyYJ/A/ryMOHVA3Skw7
 cPF2mchZBoQIs/ilY94Si5pSyDdkO8P5Gz3SO3WjG4fv93dADE+ihAwWQohzsFvrmpNU
 UQCYyuNBCHP/xElIVzV0XanR2XNd5HmxKkh7tiyV1AlUzA5HWj6917vJ2I8VeuBfv4UI
 YfD4lzpdCZKgs+U7JRvx43RrW36AtqzvcVPrR1UreskCHm/amtwekQHQQFML4cMpTsBE
 tRRMVHy7JEN2EAnzqdvO7un1TsVBrC6iD1DBzApnzk2oG3eFiA2U+Lf48vTwm/NSuNZR
 PiFQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=aPkkQqTtOIh00STuxmGzq7OTg5iXbphmw4rW7NDK6Jw=;
 b=LaSKgJTJi6suoJiLWPbtacoC0PAgDVUyrG8F6PgI386POUjcJqwM9FUr88HsUldFeo
 XSZeYkwUuCPyWb8k0sMlSmb8QRIJ2EGANJWmqF/sNhmQzBqHJyiBUNDMleYqUOOxKxt9
 F9bokjIEeex8eIyckj87APsgT4Jfnv7nx8mWv9YO/ZNiQ0wLIHWjBKaj714OSrUt5TcT
 ubgI90cczP/sfYFpPkTxOYU0NtH/gWUDGtasvoAuwtm0sTfUeguqUOC9+vC36ORCSiWY
 4R6RD86sDHcOKNC13pjzZsk7hx2Axb2Gtb1SiSwTR3X0nkMd0qCwvvNuK7SBOnQ4lX5Z
 Dkdw==
X-Gm-Message-State: AJaThX5rkxuqnOkx1FHQTAsEYBXMBMmIxXkk34CPqGIWqTeiKlaGDucN
 jVbadJ2MkO9rCUiHulkEV3L9/HXfJg+Vn1sSSw8=
X-Google-Smtp-Source: AGs4zMZ1GidzB1eCBSrgdcHfnpYNOhJq/Jhb9fqXc4lIRs0glXDRkymAoM4dsvTHnCNjOeGpej28Q+vA44KReN0t0io=
X-Received: by 10.55.159.88 with SMTP id i85mr39249607qke.46.1511882614735;
 Tue, 28 Nov 2017 07:23:34 -0800 (PST)
MIME-Version: 1.0
Received: by 10.237.43.166 with HTTP; Tue, 28 Nov 2017 07:23:34 -0800 (PST)
In-Reply-To: <CACspjXchuHBsqThsQUWm4ZoAQgo=hVkzWFFv1p0FFhf++u=7_Q@HIDDEN>
References: <CACspjXcM1ZPKw7-q_GgV-6xUOqx2QQLRJEsATYFRRE49tKrmsg@HIDDEN>
 <83bmjp6kkt.fsf@HIDDEN>
 <CACspjXe7YPju_dZH8oR7F+v_zSmQJnGkF8JjrhKyTBDvWK1w7Q@HIDDEN>
 <83wp2b67nq.fsf@HIDDEN>
 <CACspjXchuHBsqThsQUWm4ZoAQgo=hVkzWFFv1p0FFhf++u=7_Q@HIDDEN>
From: Shuguang Sun <shuguang@HIDDEN>
Date: Tue, 28 Nov 2017 23:23:34 +0800
Message-ID: <CACspjXe3NH-1areWKcnMcRSujxkoPPwOc-4fNXyMgn-mg4u18A@HIDDEN>
Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with
 Windows 7 and Samba
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="001a114d345a31897b055f0c9a62"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 29455
Cc: 29455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--001a114d345a31897b055f0c9a62
Content-Type: text/plain; charset="UTF-8"

3.
(set-file-acl "subtitle.txt"
"O:S-1-5-21-1213861250-xx-xx-207145G:DUD:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")

return t.
It changes the group or user of the file subtitle.txt, and keep only
"Everyone" (read), "S-1-22-1-79077"(r+w+x), and "S-1-22-2-108" (read). The
Windows doesn't know "S-1-22-1-79077", and "S-1-22-2-108" which comes from
the mapped network drive (users or groups in ther linux server).
The user, me, can't modify the file (permission denied).


On Tue, Nov 28, 2017 at 6:43 PM, Shuguang Sun <shuguang@HIDDEN> wrote:

>
>
> On Mon, Nov 27, 2017 at 11:52 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>
>> > From: Shuguang Sun <shuguang@HIDDEN>
>> > Date: Mon, 27 Nov 2017 14:29:18 +0800
>> > Cc: 29455 <at> debbugs.gnu.org
>> >
>> > The debug-on-error is set to t. If setq it to nil, it just raise and
>> error warning, and will not stop backup.
>>
>> May I ask why do you have it set to t?  The default is nil, and for a
>> good reason.
>>
>> > The ACE for a local file looks like:
>> > "O:S-1-5-21-1213861250-xx-xx-207145G:DUD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)
>> > (A;ID;FA;;;S-1-5-21-1213861250-xx-xx-207145)(A;ID;FA;;;LA)"
>> > (xx masks some numbers)
>> > (S-1-5-21 is SECURITY_NT_NON_UNIQUE, SIDS are not unique.)
>>
>> Thanks, but that's not what I asked.  I asked you to create a local
>> file (which I call "SOME-FILE" below, replace that with the actual
>> name of the file), and then type this inside Emacs:
>>
>>   M-: (set-file-acl "SOME-FILE" "O:S-1-22-1-79077G:S-1-22-2-10
>> 8D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
>> RET
>>
>
> It raises the same error message:
> (file-error "Setting ACL" "Operation not permitted"
> "c:/Users/username/Documents/base/subtitle.txt")
>
> or
> eval: Setting ACL: Operation not permitted, c:/Users/username/HOME/.emacs.
> d/autosave/.bashrc.~1~
>
> 2.
> (set-file-acl "subtitle.txt" "O:S-1-22-1-79077G:S-1-22-2-
> 108D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-
> 1213861250-xx-207145)(A;ID;FA;;;LA)")
> returns nil
> In this case, "O:S-1-22-1-79077G:S-1-22-2-108" is from DACL in network
> drive; "D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-
> 1213861250-xx-207145)(A;ID;FA;;;LA)" is from local drive where I have
> full read/write access.
>
>
>
>>
>> (This is one long line.)  Then tell me if this succeeded or signaled
>> an error.
>>
>> If the above succeeds for an arbitrary file, then please try the same
>> for a file under the c:/Users/username/HOME/.emacs.d/ directory, maybe
>> the problem is with the permissions of that directory.
>>
>> The "Operation not permitted" error seems to indicate that your user
>> is unable to acquire the privileges needed for setting the DACL of a
>> file on your local disk.  Or it could mean some other problem.  The
>> above test might give a hint about the reason for the failure.
>>
>> > I searched online and find that O:S-1-22 is a unix/linux mapped to
>> windows by samba. And actually in my
>> > situation is that I have files in a linux server, and mapped it as
>> network driver in Windows 7 (maybe by
>> > Samba). All such kind of files (what I can edit) have ACL/SDDL
>> O:S-1-22-1-79077G:S-1-22-2-108D:P
>> > (A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD).
>>
>> I don't think this is related to the networked drive, because the
>> failure happens when Emacs tries to set the DACL of the backup file,
>> which is stored on your local disk drive.
>>
>
>

--001a114d345a31897b055f0c9a62
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>3.</div><div>(set-file-acl &quot;subtitle.txt&quot; &=
quot;O:S-1-5-21-1213861250-xx-xx-207145G:DUD:P(A;;0x1e01ff;;;S-1-22-1-79077=
)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)&quot;) <br></div><div>return t.</div><d=
iv>It changes the group or user of the file subtitle.txt, and keep only &qu=
ot;Everyone&quot; (read), &quot;S-1-22-1-79077&quot;(r+w+x), and &quot;S-1-=
22-2-108&quot; (read). The Windows doesn&#39;t know &quot;S-1-22-1-79077&qu=
ot;, and &quot;S-1-22-2-108&quot; which comes from the mapped network drive=
 (users or groups in ther linux server).</div><div>The user, me, can&#39;t =
modify the file (permission denied).<br></div><div><br></div></div><div cla=
ss=3D"gmail_extra"><br><div class=3D"gmail_quote">On Tue, Nov 28, 2017 at 6=
:43 PM, Shuguang Sun <span dir=3D"ltr">&lt;<a href=3D"mailto:shuguang@gmail=
.com" target=3D"_blank">shuguang@HIDDEN</a>&gt;</span> wrote:<br><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div dir=3D"ltr"><br><div class=3D"gmail_extra"><br=
><div class=3D"gmail_quote"><span class=3D"">On Mon, Nov 27, 2017 at 11:52 =
PM, Eli Zaretskii <span dir=3D"ltr">&lt;<a href=3D"mailto:eliz@HIDDEN" tar=
get=3D"_blank">eliz@HIDDEN</a>&gt;</span> wrote:<br></span><span class=3D"=
"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde=
r-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; From: Shuguang Sun=
 &lt;<a href=3D"mailto:shuguang@HIDDEN" target=3D"_blank">shuguang@gmail=
.com</a>&gt;<br>
&gt; Date: Mon, 27 Nov 2017 14:29:18 +0800<br>
&gt; Cc: <a href=3D"mailto:29455 <at> debbugs.gnu.org" target=3D"_blank">29455@d=
ebbugs.gnu.org</a><br>
<span class=3D"m_3567516574035592932gmail-">&gt;<br>
&gt; The debug-on-error is set to t. If setq it to nil, it just raise and e=
rror warning, and will not stop backup.<br>
<br>
</span>May I ask why do you have it set to t?=C2=A0 The default is nil, and=
 for a<br>
good reason.<br>
<span class=3D"m_3567516574035592932gmail-"><br>
&gt; The ACE for a local file looks like:<br>
&gt; &quot;O:S-1-5-21-1213861250-xx-xx-2<wbr>07145G:DUD:AI(A;ID;FA;;;SY)(A;=
<wbr>ID;FA;;;BA)<br>
&gt; (A;ID;FA;;;S-1-5-21-1213861250<wbr>-xx-xx-207145)(A;ID;FA;;;LA)&quot;<=
br>
&gt; (xx masks some numbers)<br>
&gt; (S-1-5-21 is SECURITY_NT_NON_UNIQUE, SIDS are not unique.)<br>
<br>
</span>Thanks, but that&#39;s not what I asked.=C2=A0 I asked you to create=
 a local<br>
file (which I call &quot;SOME-FILE&quot; below, replace that with the actua=
l<br>
name of the file), and then type this inside Emacs:<br>
<br>
=C2=A0 M-: (set-file-acl &quot;SOME-FILE&quot; &quot;O:S-1-22-1-79077G:S-1-=
22-2-10<wbr>8D:P(A;;0x1e01ff;;;S-1-22-1-79<wbr>077)(A;;FR;;;S-1-22-2-108)(A=
;;<wbr>FR;;;WD)&quot;) RET<br></blockquote><div><br></div></span><div><span=
 class=3D""><div>It raises the same error message:</div><div></div></span><=
div>(file-error &quot;Setting ACL&quot; &quot;Operation not permitted&quot;=
 &quot;c:/Users/username/Documents/b<wbr>ase/subtitle.txt&quot;)</div><div>=
<br></div><div>or<br></div><span class=3D"">eval: Setting ACL: Operation no=
t permitted, c:/Users/username/HOME/.emacs.<wbr>d/autosave/.bashrc.~1~</spa=
n></div><div><br></div><div>2. <br></div><div>(set-file-acl &quot;subtitle.=
txt&quot; &quot;O:S-1-22-1-79077G:S-1-22-2-<wbr>108D:AI(A;ID;FA;;;SY)(A;ID;=
FA;<wbr>;;BA)(A;ID;FA;;;S-1-5-21-<wbr>1213861250-xx-207145)(A;ID;FA;<wbr>;;=
LA)&quot;) <br></div><div>returns nil</div><div>In this case, &quot;O:S-1-2=
2-1-79077G:S-1-22-2-<wbr>108&quot; is from DACL in network drive; &quot;D:A=
I(A;ID;FA;;;SY)(A;ID;FA;;;<wbr>BA)(A;ID;FA;;;S-1-5-21-<wbr>1213861250-xx-20=
7145)(A;ID;FA;<wbr>;;LA)&quot; is from local drive where I have full read/w=
rite access.<br></div><span class=3D""><div><br></div><div>=C2=A0</div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);padding-left:1ex">
<br>
(This is one long line.)=C2=A0 Then tell me if this succeeded or signaled<b=
r>
an error.<br>
<br>
If the above succeeds for an arbitrary file, then please try the same<br>
for a file under the c:/Users/username/HOME/.emacs.<wbr>d/ directory, maybe=
<br>
the problem is with the permissions of that directory.<br>
<br>
The &quot;Operation not permitted&quot; error seems to indicate that your u=
ser<br>
is unable to acquire the privileges needed for setting the DACL of a<br>
file on your local disk.=C2=A0 Or it could mean some other problem.=C2=A0 T=
he<br>
above test might give a hint about the reason for the failure.<br>
<span class=3D"m_3567516574035592932gmail-"><br>
&gt; I searched online and find that O:S-1-22 is a unix/linux mapped to win=
dows by samba. And actually in my<br>
&gt; situation is that I have files in a linux server, and mapped it as net=
work driver in Windows 7 (maybe by<br>
&gt; Samba). All such kind of files (what I can edit) have ACL/SDDL O:S-1-2=
2-1-79077G:S-1-22-2-108<wbr>D:P<br>
&gt; (A;;0x1e01ff;;;S-1-22-1-79077)<wbr>(A;;FR;;;S-1-22-2-108)(A;;FR;;<wbr>=
;WD).<br>
<br>
</span>I don&#39;t think this is related to the networked drive, because th=
e<br>
failure happens when Emacs tries to set the DACL of the backup file,<br>
which is stored on your local disk drive.<br>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div>

--001a114d345a31897b055f0c9a62--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29455; Package emacs. Full text available.

Message received at 29455 <at> debbugs.gnu.org:


Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 10:44:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 28 05:44:02 2017
Received: from localhost ([127.0.0.1]:33534 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eJdMv-0007Lf-Fl
	for submit <at> debbugs.gnu.org; Tue, 28 Nov 2017 05:44:02 -0500
Received: from mail-qk0-f181.google.com ([209.85.220.181]:34954)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <shuguang@HIDDEN>) id 1eJdMt-0007LH-54
 for 29455 <at> debbugs.gnu.org; Tue, 28 Nov 2017 05:43:59 -0500
Received: by mail-qk0-f181.google.com with SMTP id p19so36393683qke.2
 for <29455 <at> debbugs.gnu.org>; Tue, 28 Nov 2017 02:43:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=Uq24lIBOSIhjRJl7Ke2vuvCaTHv9U5f5H4yZvKz3tcU=;
 b=pR/ieUp1mNhyUtDNGoJOrtLbFGLxLq9qEy1b+xIXACE3Ht1hyuKLSof8XrHC3OzxDz
 jxsk/KoLe3SeZnk6dO9lN7N6jL3FNPGtjMuoYGBMlsaHeraTQWbU6qCbn9n+5ktm+22X
 me2PCKmpEwug8YUeBi8oPPQnKFXtVH3hSSFyqKZMvHQl0LhzzMosSZjbVAcDL6QMTBnk
 c2/wtuowQUSgZUbV/vjJg5EdEfaxUB/6dHuiag8s/xLn2WfiCyI0NwK04f+Z4rr78BHF
 6rTRjHhcUlhQFpshBIuNUUb4I+/JYm3neChppkJMVkiYpZd3EN3sJ52dYlGvhkSBAUuR
 hxUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=Uq24lIBOSIhjRJl7Ke2vuvCaTHv9U5f5H4yZvKz3tcU=;
 b=lMKA4JEt+y0i9QeOpMouLaq3XdaRO1+gtpf7ebAoO0qJBJvb6EQd+N1IeggezDq/xA
 78FvmTOOMeN6E3uf6Q9u2EJ+LFoDBtMzI9nu0tKVcGU2ncGNtQJWiwMMlTz1LM9kUz4G
 AWj2yz2Q+r4bKfEfYBASZn/q/qRGxBSOD69r8swOa8s7ndrDDd3EXFtiXx0A3acVWkmr
 AeRiW4fesWaxLbRniJjRt4wjoCtL+ZDm0/8jlATvBevV5nBOxPzzxYKatTujB5g98+GK
 bMXMTD/SZ/YU9FkYvPBTsWAybFndvV7sxhYDT0bOnuB4B/4vh7WYafNllxvLyHt7DtR4
 gk2w==
X-Gm-Message-State: AJaThX4QFmweAs/r6ef0ywLu0kar60Hf0bIoOtwnh+58lEzBE1ynmj51
 /AOTtIbM3rnzKr5nJfLGvj/Wlj50MWHliTAmX7k=
X-Google-Smtp-Source: AGs4zMaT5XM99KaLx0k8oiiPvTz4RRPTvRfPa7u/bRCx8krxaPCnoS1xCBNr3R1qEpDejUjHsXySaWM/r9GnkcsmnFc=
X-Received: by 10.55.98.134 with SMTP id w128mr60844996qkb.292.1511865833517; 
 Tue, 28 Nov 2017 02:43:53 -0800 (PST)
MIME-Version: 1.0
Received: by 10.237.43.166 with HTTP; Tue, 28 Nov 2017 02:43:53 -0800 (PST)
In-Reply-To: <83wp2b67nq.fsf@HIDDEN>
References: <CACspjXcM1ZPKw7-q_GgV-6xUOqx2QQLRJEsATYFRRE49tKrmsg@HIDDEN>
 <83bmjp6kkt.fsf@HIDDEN>
 <CACspjXe7YPju_dZH8oR7F+v_zSmQJnGkF8JjrhKyTBDvWK1w7Q@HIDDEN>
 <83wp2b67nq.fsf@HIDDEN>
From: Shuguang Sun <shuguang@HIDDEN>
Date: Tue, 28 Nov 2017 18:43:53 +0800
Message-ID: <CACspjXchuHBsqThsQUWm4ZoAQgo=hVkzWFFv1p0FFhf++u=7_Q@HIDDEN>
Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with
 Windows 7 and Samba
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="001a11482b1cf4784c055f08b193"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 29455
Cc: 29455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--001a11482b1cf4784c055f08b193
Content-Type: text/plain; charset="UTF-8"

On Mon, Nov 27, 2017 at 11:52 PM, Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Shuguang Sun <shuguang@HIDDEN>
> > Date: Mon, 27 Nov 2017 14:29:18 +0800
> > Cc: 29455 <at> debbugs.gnu.org
> >
> > The debug-on-error is set to t. If setq it to nil, it just raise and
> error warning, and will not stop backup.
>
> May I ask why do you have it set to t?  The default is nil, and for a
> good reason.
>
> > The ACE for a local file looks like:
> > "O:S-1-5-21-1213861250-xx-xx-207145G:DUD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)
> > (A;ID;FA;;;S-1-5-21-1213861250-xx-xx-207145)(A;ID;FA;;;LA)"
> > (xx masks some numbers)
> > (S-1-5-21 is SECURITY_NT_NON_UNIQUE, SIDS are not unique.)
>
> Thanks, but that's not what I asked.  I asked you to create a local
> file (which I call "SOME-FILE" below, replace that with the actual
> name of the file), and then type this inside Emacs:
>
>   M-: (set-file-acl "SOME-FILE" "O:S-1-22-1-79077G:S-1-22-2-
> 108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
> RET
>

It raises the same error message:
(file-error "Setting ACL" "Operation not permitted"
"c:/Users/username/Documents/base/subtitle.txt")

or
eval: Setting ACL: Operation not permitted, c:/Users/username/HOME/.emacs.
d/autosave/.bashrc.~1~

2.
(set-file-acl "subtitle.txt"
"O:S-1-22-1-79077G:S-1-22-2-108D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1213861250-xx-207145)(A;ID;FA;;;LA)")

returns nil
In this case, "O:S-1-22-1-79077G:S-1-22-2-108" is from DACL in network
drive;
"D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1213861250-xx-207145)(A;ID;FA;;;LA)"
is from local drive where I have full read/write access.



>
> (This is one long line.)  Then tell me if this succeeded or signaled
> an error.
>
> If the above succeeds for an arbitrary file, then please try the same
> for a file under the c:/Users/username/HOME/.emacs.d/ directory, maybe
> the problem is with the permissions of that directory.
>
> The "Operation not permitted" error seems to indicate that your user
> is unable to acquire the privileges needed for setting the DACL of a
> file on your local disk.  Or it could mean some other problem.  The
> above test might give a hint about the reason for the failure.
>
> > I searched online and find that O:S-1-22 is a unix/linux mapped to
> windows by samba. And actually in my
> > situation is that I have files in a linux server, and mapped it as
> network driver in Windows 7 (maybe by
> > Samba). All such kind of files (what I can edit) have ACL/SDDL
> O:S-1-22-1-79077G:S-1-22-2-108D:P
> > (A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD).
>
> I don't think this is related to the networked drive, because the
> failure happens when Emacs tries to set the DACL of the backup file,
> which is stored on your local disk drive.
>

--001a11482b1cf4784c055f08b193
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Mon, Nov 27, 2017 at 11:52 PM, Eli Zaretskii <span dir=3D"ltr">&lt;<=
a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&gt;</span=
> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; From: Sh=
uguang Sun &lt;<a href=3D"mailto:shuguang@HIDDEN">shuguang@HIDDEN</a>=
&gt;<br>
&gt; Date: Mon, 27 Nov 2017 14:29:18 +0800<br>
&gt; Cc: <a href=3D"mailto:29455 <at> debbugs.gnu.org">29455 <at> debbugs.gnu.org</a>=
<br>
<span class=3D"gmail-">&gt;<br>
&gt; The debug-on-error is set to t. If setq it to nil, it just raise and e=
rror warning, and will not stop backup.<br>
<br>
</span>May I ask why do you have it set to t?=C2=A0 The default is nil, and=
 for a<br>
good reason.<br>
<span class=3D"gmail-"><br>
&gt; The ACE for a local file looks like:<br>
&gt; &quot;O:S-1-5-21-1213861250-xx-xx-<wbr>207145G:DUD:AI(A;ID;FA;;;SY)(<w=
br>A;ID;FA;;;BA)<br>
&gt; (A;ID;FA;;;S-1-5-21-<wbr>1213861250-xx-xx-207145)(A;ID;<wbr>FA;;;LA)&q=
uot;<br>
&gt; (xx masks some numbers)<br>
&gt; (S-1-5-21 is SECURITY_NT_NON_UNIQUE, SIDS are not unique.)<br>
<br>
</span>Thanks, but that&#39;s not what I asked.=C2=A0 I asked you to create=
 a local<br>
file (which I call &quot;SOME-FILE&quot; below, replace that with the actua=
l<br>
name of the file), and then type this inside Emacs:<br>
<br>
=C2=A0 M-: (set-file-acl &quot;SOME-FILE&quot; &quot;O:S-1-22-1-79077G:S-1-=
22-2-<wbr>108D:P(A;;0x1e01ff;;;S-1-22-1-<wbr>79077)(A;;FR;;;S-1-22-2-108)(<=
wbr>A;;FR;;;WD)&quot;) RET<br></blockquote><div><br></div><div><div>It rais=
es the same error message:</div><div></div><div>(file-error &quot;Setting A=
CL&quot; &quot;Operation not permitted&quot; &quot;c:/Users/username/Docume=
nts/<wbr>base/subtitle.txt&quot;)</div><div><br></div><div>or<br></div>eval=
: Setting ACL: Operation not permitted, c:/Users/username/HOME/.emacs.<wbr>=
d/autosave/.bashrc.~1~</div><div><br></div><div>2. <br></div><div>(set-file=
-acl &quot;subtitle.txt&quot; &quot;O:S-1-22-1-79077G:S-1-22-2-108D:AI(A;ID=
;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1213861250-xx-207145)(A;ID;FA;;;=
LA)&quot;) <br></div><div>returns nil</div><div>In this case, &quot;O:S-1-2=
2-1-79077G:S-1-22-2-108&quot; is from DACL in network drive; &quot;D:AI(A;I=
D;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1213861250-xx-207145)(A;ID;FA;;=
;LA)&quot; is from local drive where I have full read/write access.<br></di=
v><div><br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">
<br>
(This is one long line.)=C2=A0 Then tell me if this succeeded or signaled<b=
r>
an error.<br>
<br>
If the above succeeds for an arbitrary file, then please try the same<br>
for a file under the c:/Users/username/HOME/.emacs.<wbr>d/ directory, maybe=
<br>
the problem is with the permissions of that directory.<br>
<br>
The &quot;Operation not permitted&quot; error seems to indicate that your u=
ser<br>
is unable to acquire the privileges needed for setting the DACL of a<br>
file on your local disk.=C2=A0 Or it could mean some other problem.=C2=A0 T=
he<br>
above test might give a hint about the reason for the failure.<br>
<span class=3D"gmail-"><br>
&gt; I searched online and find that O:S-1-22 is a unix/linux mapped to win=
dows by samba. And actually in my<br>
&gt; situation is that I have files in a linux server, and mapped it as net=
work driver in Windows 7 (maybe by<br>
&gt; Samba). All such kind of files (what I can edit) have ACL/SDDL O:S-1-2=
2-1-79077G:S-1-22-2-<wbr>108D:P<br>
&gt; (A;;0x1e01ff;;;S-1-22-1-79077)<wbr>(A;;FR;;;S-1-22-2-108)(A;;FR;;<wbr>=
;WD).<br>
<br>
</span>I don&#39;t think this is related to the networked drive, because th=
e<br>
failure happens when Emacs tries to set the DACL of the backup file,<br>
which is stored on your local disk drive.<br>
</blockquote></div><br></div></div>

--001a11482b1cf4784c055f08b193--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29455; Package emacs. Full text available.

Message received at 29455 <at> debbugs.gnu.org:


Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 09:11:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 28 04:11:42 2017
Received: from localhost ([127.0.0.1]:33469 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eJbvZ-0005BJ-MR
	for submit <at> debbugs.gnu.org; Tue, 28 Nov 2017 04:11:42 -0500
Received: from mail-qk0-f176.google.com ([209.85.220.176]:41300)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <shuguang@HIDDEN>) id 1eJbvY-0005B7-EH
 for 29455 <at> debbugs.gnu.org; Tue, 28 Nov 2017 04:11:40 -0500
Received: by mail-qk0-f176.google.com with SMTP id f63so36105901qke.8
 for <29455 <at> debbugs.gnu.org>; Tue, 28 Nov 2017 01:11:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=xPf+iUD/ZTXFMzPycLVqxmhyph4gBvGd7Ym6GB0tit0=;
 b=jjt4myWMi822YWYO2UTFnGTaxtsaZUuqbJoQjn7fMiGLQg+rPSDcQpuv1jJBxPI7x+
 E0N68H/d+TPGJ0Gw1tslAsCJoqUrg6zutdDHCSkvjYZvmWAZ3Jj6Sv5UbWGEv+DTOK0c
 57oSDyKbGh6wXN8jSrGDqCIHwTXb2V1VFPCEbZ7XCtodcBfp4RWixom/Mm+TqtjkL/fg
 xJY5157hAg1YpEWIdyQDXF9JAfJ0OLO1wMQKt5eAJb0m7PQuxUtorKp9TDkIeoC07NTM
 XWvow0FjO7EjQAa7qvH5TV70otN1qE+uaZJ2+g1GLqcRmWEVa8Rdv/Z4y0Wea4udor7u
 qLHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=xPf+iUD/ZTXFMzPycLVqxmhyph4gBvGd7Ym6GB0tit0=;
 b=ZvWoLadRGzXBWYR9U7Z03RDstc2cg6nxodDTuat5fKZt40B/nvV2j1K0+7FWqm1GLl
 zYYq/WoDlnS/Ykvlr60ZhgKtg8K2sdIuWTCGDahxNnVhZIYLjy5Ce1BPDa3lIVehuaHb
 NV1CDyyRZJPCsaHtfl3InfdwIBHUOeADgFj/xZR4Ky3/xuMFX5C5vnIcDW6Dm4Rp7nRV
 YyKC/JqC8zI0eN06eaZpaud9DmrKx27UKCQTOgXGUa7QR/C08cfWCIW/QRzVFM0oG0x0
 MUTNGUB/XPYgXQ+Dc6e7ceZ7PO18sKxt2mS3GlJGYfHy4eixTzDQutbAFUMyxs/LbHvV
 wRuQ==
X-Gm-Message-State: AJaThX7R47XfuaMnZXaVSJRkh8tpw5QwF6KKveWASC/Bby/de78jyjE3
 v+ATWhNB78BR/WQ+Rjk3K9/32m6lbewflO/nA0zK6w==
X-Google-Smtp-Source: AGs4zMZ40Bn5T79zq4aliRYI3XD84/b/V9TPmkton5zVOyhHkod23RRxZeDy7Y/3LS65rOnvlxri1YRx+hNg4cVw6Pc=
X-Received: by 10.55.15.208 with SMTP id 77mr60408614qkp.193.1511860294932;
 Tue, 28 Nov 2017 01:11:34 -0800 (PST)
MIME-Version: 1.0
Received: by 10.237.43.166 with HTTP; Tue, 28 Nov 2017 01:11:34 -0800 (PST)
In-Reply-To: <83wp2b67nq.fsf@HIDDEN>
References: <CACspjXcM1ZPKw7-q_GgV-6xUOqx2QQLRJEsATYFRRE49tKrmsg@HIDDEN>
 <83bmjp6kkt.fsf@HIDDEN>
 <CACspjXe7YPju_dZH8oR7F+v_zSmQJnGkF8JjrhKyTBDvWK1w7Q@HIDDEN>
 <83wp2b67nq.fsf@HIDDEN>
From: Shuguang Sun <shuguang@HIDDEN>
Date: Tue, 28 Nov 2017 17:11:34 +0800
Message-ID: <CACspjXebUQt1q5Z7=pJycH0BL+LAr4QhSGdtEWK9J4qonTnTuA@HIDDEN>
Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with
 Windows 7 and Samba
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="001a1147603cd45fc8055f076738"
X-Spam-Score: -0.1 (/)
X-Debbugs-Envelope-To: 29455
Cc: 29455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--001a1147603cd45fc8055f076738
Content-Type: text/plain; charset="UTF-8"

On Mon, Nov 27, 2017 at 11:52 PM, Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Shuguang Sun <shuguang@HIDDEN>
> > Date: Mon, 27 Nov 2017 14:29:18 +0800
> > Cc: 29455 <at> debbugs.gnu.org
> >
> > The debug-on-error is set to t. If setq it to nil, it just raise and
> error warning, and will not stop backup.
>
> May I ask why do you have it set to t?  The default is nil, and for a
> good reason.
>
It is a long history and I can't recall when I put it my init file... old
user


> > The ACE for a local file looks like:
> > "O:S-1-5-21-1213861250-xx-xx-207145G:DUD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)
> > (A;ID;FA;;;S-1-5-21-1213861250-xx-xx-207145)(A;ID;FA;;;LA)"
> > (xx masks some numbers)
> > (S-1-5-21 is SECURITY_NT_NON_UNIQUE, SIDS are not unique.)
>
> Thanks, but that's not what I asked.  I asked you to create a local
> file (which I call "SOME-FILE" below, replace that with the actual
> name of the file), and then type this inside Emacs:
>
>   M-: (set-file-acl "SOME-FILE" "O:S-1-22-1-79077G:S-1-22-2-
> 108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
> RET
>
> (This is one long line.)  Then tell me if this succeeded or signaled
> an error.
>
It raises the same error message:

(file-error "Setting ACL" "Operation not permitted"
"c:/Users/username/Documents/base/subtitle.txt")

eval: Setting ACL: Operation not permitted,
c:/Users/username/HOME/.emacs.d/autosave/.bashrc.~1~


> If the above succeeds for an arbitrary file, then please try the same
> for a file under the c:/Users/username/HOME/.emacs.d/ directory, maybe
> the problem is with the permissions of that directory.
>
> The "Operation not permitted" error seems to indicate that your user
> is unable to acquire the privileges needed for setting the DACL of a
> file on your local disk.  Or it could mean some other problem.  The
> above test might give a hint about the reason for the failure.
>
> > I searched online and find that O:S-1-22 is a unix/linux mapped to
> windows by samba. And actually in my
> > situation is that I have files in a linux server, and mapped it as
> network driver in Windows 7 (maybe by
> > Samba). All such kind of files (what I can edit) have ACL/SDDL
> O:S-1-22-1-79077G:S-1-22-2-108D:P
> > (A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD).
>
> I don't think this is related to the networked drive, because the
> failure happens when Emacs tries to set the DACL of the backup file,
> which is stored on your local disk drive.
>
It copies the DACL from the file in the network drive. I don't know the
exact underlying logic under Windows 7. But if I copy the file from the
netdrive to local disk drive, the ACL will change from O:S-1-22-1  to
O:S-1-5-21, vise versa. The owner (O:S-) changes.

--001a1147603cd45fc8055f076738
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Mon, Nov 27, 2017 at 11:52 PM, Eli Zaretskii <span dir=3D"ltr">&lt;<=
a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&gt;</span=
> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; From: Sh=
uguang Sun &lt;<a href=3D"mailto:shuguang@HIDDEN">shuguang@HIDDEN</a>=
&gt;<br>
&gt; Date: Mon, 27 Nov 2017 14:29:18 +0800<br>
&gt; Cc: <a href=3D"mailto:29455 <at> debbugs.gnu.org">29455 <at> debbugs.gnu.org</a>=
<br>
<span class=3D"gmail-">&gt;<br>
&gt; The debug-on-error is set to t. If setq it to nil, it just raise and e=
rror warning, and will not stop backup.<br>
<br>
</span>May I ask why do you have it set to t?=C2=A0 The default is nil, and=
 for a<br>
good reason.<br></blockquote><div>It is a long history and I can&#39;t reca=
ll when I put it my init file... old user<br></div><div> <br></div><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px=
 solid rgb(204,204,204);padding-left:1ex">
<span class=3D"gmail-"><br>
&gt; The ACE for a local file looks like:<br>
&gt; &quot;O:S-1-5-21-1213861250-xx-xx-<wbr>207145G:DUD:AI(A;ID;FA;;;SY)(<w=
br>A;ID;FA;;;BA)<br>
&gt; (A;ID;FA;;;S-1-5-21-<wbr>1213861250-xx-xx-207145)(A;ID;<wbr>FA;;;LA)&q=
uot;<br>
&gt; (xx masks some numbers)<br>
&gt; (S-1-5-21 is SECURITY_NT_NON_UNIQUE, SIDS are not unique.)<br>
<br>
</span>Thanks, but that&#39;s not what I asked.=C2=A0 I asked you to create=
 a local<br>
file (which I call &quot;SOME-FILE&quot; below, replace that with the actua=
l<br>
name of the file), and then type this inside Emacs:<br>
<br>
=C2=A0 M-: (set-file-acl &quot;SOME-FILE&quot; &quot;O:S-1-22-1-79077G:S-1-=
22-2-<wbr>108D:P(A;;0x1e01ff;;;S-1-22-1-<wbr>79077)(A;;FR;;;S-1-22-2-108)(<=
wbr>A;;FR;;;WD)&quot;) RET<br>
<br>
(This is one long line.)=C2=A0 Then tell me if this succeeded or signaled<b=
r>
an error.<br></blockquote><div>It raises the same error message:</div><div>=
<br></div><div>(file-error &quot;Setting ACL&quot; &quot;Operation not perm=
itted&quot; &quot;c:/Users/username/Documents/base/subtitle.txt&quot;)</div=
><div><br></div><div>eval: Setting ACL: Operation not permitted, c:/Users/u=
sername/HOME/.emacs.d/autosave/.bashrc.~1~<br></div><div> <br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p=
x solid rgb(204,204,204);padding-left:1ex">
<br>
If the above succeeds for an arbitrary file, then please try the same<br>
for a file under the c:/Users/username/HOME/.emacs.<wbr>d/ directory, maybe=
<br>
the problem is with the permissions of that directory.<br>
<br>
The &quot;Operation not permitted&quot; error seems to indicate that your u=
ser<br>
is unable to acquire the privileges needed for setting the DACL of a<br>
file on your local disk.=C2=A0 Or it could mean some other problem.=C2=A0 T=
he<br>
above test might give a hint about the reason for the failure.<br>
<span class=3D"gmail-"><br>
&gt; I searched online and find that O:S-1-22 is a unix/linux mapped to win=
dows by samba. And actually in my<br>
&gt; situation is that I have files in a linux server, and mapped it as net=
work driver in Windows 7 (maybe by<br>
&gt; Samba). All such kind of files (what I can edit) have ACL/SDDL O:S-1-2=
2-1-79077G:S-1-22-2-<wbr>108D:P<br>
&gt; (A;;0x1e01ff;;;S-1-22-1-79077)<wbr>(A;;FR;;;S-1-22-2-108)(A;;FR;;<wbr>=
;WD).<br>
<br>
</span>I don&#39;t think this is related to the networked drive, because th=
e<br>
failure happens when Emacs tries to set the DACL of the backup file,<br>
which is stored on your local disk drive.<br></blockquote><div>It copies th=
e DACL from the file in the network drive. I don&#39;t know the exact under=
lying logic under Windows 7. But if I copy the file from the netdrive to lo=
cal disk drive, the ACL will change from <span class=3D"gmail-">O:S-1-22-1=
=C2=A0 to </span><br><span class=3D"gmail-"><span class=3D"gmail-">O:S-1-5-=
21, vise versa. The owner (O:S-) changes.<br></span></span></div></div><br>=
</div></div>

--001a1147603cd45fc8055f076738--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29455; Package emacs. Full text available.

Message received at 29455 <at> debbugs.gnu.org:


Received: (at 29455) by debbugs.gnu.org; 27 Nov 2017 15:52:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 27 10:52:49 2017
Received: from localhost ([127.0.0.1]:32868 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eJLiD-0005Q1-9H
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2017 10:52:49 -0500
Received: from eggs.gnu.org ([208.118.235.92]:41529)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1eJLiC-0005Po-4q
 for 29455 <at> debbugs.gnu.org; Mon, 27 Nov 2017 10:52:48 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1eJLi1-0004j4-59
 for 29455 <at> debbugs.gnu.org; Mon, 27 Nov 2017 10:52:42 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50440)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1eJLi1-0004j0-1d; Mon, 27 Nov 2017 10:52:37 -0500
Received: from [176.228.60.248] (port=2080 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1eJLi0-0003Xk-H3; Mon, 27 Nov 2017 10:52:36 -0500
Date: Mon, 27 Nov 2017 17:52:25 +0200
Message-Id: <83wp2b67nq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Shuguang Sun <shuguang@HIDDEN>
In-reply-to: <CACspjXe7YPju_dZH8oR7F+v_zSmQJnGkF8JjrhKyTBDvWK1w7Q@HIDDEN>
 (message from Shuguang Sun on Mon, 27 Nov 2017 14:29:18 +0800)
Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with
 Windows 7 and Samba
References: <CACspjXcM1ZPKw7-q_GgV-6xUOqx2QQLRJEsATYFRRE49tKrmsg@HIDDEN>
 <83bmjp6kkt.fsf@HIDDEN>
 <CACspjXe7YPju_dZH8oR7F+v_zSmQJnGkF8JjrhKyTBDvWK1w7Q@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 29455
Cc: 29455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Shuguang Sun <shuguang@HIDDEN>
> Date: Mon, 27 Nov 2017 14:29:18 +0800
> Cc: 29455 <at> debbugs.gnu.org
> 
> The debug-on-error is set to t. If setq it to nil, it just raise and error warning, and will not stop backup.

May I ask why do you have it set to t?  The default is nil, and for a
good reason.

> The ACE for a local file looks like:
> "O:S-1-5-21-1213861250-xx-xx-207145G:DUD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)
> (A;ID;FA;;;S-1-5-21-1213861250-xx-xx-207145)(A;ID;FA;;;LA)"
> (xx masks some numbers)
> (S-1-5-21 is SECURITY_NT_NON_UNIQUE, SIDS are not unique.)

Thanks, but that's not what I asked.  I asked you to create a local
file (which I call "SOME-FILE" below, replace that with the actual
name of the file), and then type this inside Emacs:

  M-: (set-file-acl "SOME-FILE" "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)") RET

(This is one long line.)  Then tell me if this succeeded or signaled
an error.

If the above succeeds for an arbitrary file, then please try the same
for a file under the c:/Users/username/HOME/.emacs.d/ directory, maybe
the problem is with the permissions of that directory.

The "Operation not permitted" error seems to indicate that your user
is unable to acquire the privileges needed for setting the DACL of a
file on your local disk.  Or it could mean some other problem.  The
above test might give a hint about the reason for the failure.

> I searched online and find that O:S-1-22 is a unix/linux mapped to windows by samba. And actually in my
> situation is that I have files in a linux server, and mapped it as network driver in Windows 7 (maybe by
> Samba). All such kind of files (what I can edit) have ACL/SDDL O:S-1-22-1-79077G:S-1-22-2-108D:P
> (A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD). 

I don't think this is related to the networked drive, because the
failure happens when Emacs tries to set the DACL of the backup file,
which is stored on your local disk drive.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29455; Package emacs. Full text available.

Message received at 29455 <at> debbugs.gnu.org:


Received: (at 29455) by debbugs.gnu.org; 27 Nov 2017 06:29:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 27 01:29:26 2017
Received: from localhost ([127.0.0.1]:59941 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eJCv0-0006PZ-CY
	for submit <at> debbugs.gnu.org; Mon, 27 Nov 2017 01:29:26 -0500
Received: from mail-qk0-f181.google.com ([209.85.220.181]:42115)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <shuguang@HIDDEN>) id 1eJCuy-0006PL-9o
 for 29455 <at> debbugs.gnu.org; Mon, 27 Nov 2017 01:29:24 -0500
Received: by mail-qk0-f181.google.com with SMTP id a194so31067296qkc.9
 for <29455 <at> debbugs.gnu.org>; Sun, 26 Nov 2017 22:29:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=muQhJ5YtMNN/iCwBJxgfELH3B4AA2wMZyehMT43Un6g=;
 b=MglzWvxtJ7n/g19zefuXtc/Xvxx3xh8JbR22NYuQCwRtHSuq0hybVPrT/2Nt/GB6FH
 rPHzDr2BQmjclgxvoHWpmet67PuH15udzWb4MM7Pz3fKaglPGCSCCvQaYCwA9HzyPX1Q
 C2usFhPVBTbIQlQ6I8N9TCcnGzLacUmELDAbITkcxQ6JT5P40cr8XWN70/D32p9YTvNV
 wEBFzmqGNao3QOlt3vs5BqhJQ0mFjJyRzA8fP/fzdRFiwSfMO5M6zGTmU5/Kok+8cm/9
 iwTsDBGFZxA0P0NKiMZqFicXq/SQYK1Dj+xBfVF9BVHs4LaB97JQNtp8OLKgNLNqAd/F
 paPA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=muQhJ5YtMNN/iCwBJxgfELH3B4AA2wMZyehMT43Un6g=;
 b=V3b+aFbGSKBhbCQl/CeqXWInUChfqhlkWDVQhkDttAyW6LJxSQXFblSX53xGp3CMqg
 d55f2DwFqJLPciSjbVUrgXBJohV288sioB7ywBa64u2gZ4h3NVeKXC5YzE2ucdUEk/D6
 qDPjFZ7XlYK+JsDTGK19drdcJagrV24lkQ21EhC7q6pLfikSArjHV/oqWmamoQ5cSbID
 m4eeBrNcQz7Rn53Mer32MweKvY5Sb4TH+PW8eqvLCvNvXXV2vMwDsxsv7DHljSF8pWv2
 36mtMu10INN4F4RtS+T7yJdzsIvqvcr2bgr1Bm7gC+g/VswWKVZyrPgPWSs7sSA7V3gD
 HsTQ==
X-Gm-Message-State: AJaThX6eWjyF/SA+DiGhn03eJdx298Rd6VlT53XeiGXE2FFvm9mjicu7
 sx+ZOQ7YxzKd57EaMNTylTLv5kFWnFd+me4PRcU=
X-Google-Smtp-Source: AGs4zMYx6j21pdZEapSk3BzMKdGz4nCgzUzjmH8NfXlXG+tWdx3sn6PCoyLR1KlfnBdxMU12dgNbxsYNQyDZz0EisIE=
X-Received: by 10.55.87.199 with SMTP id l190mr55315017qkb.30.1511764158827;
 Sun, 26 Nov 2017 22:29:18 -0800 (PST)
MIME-Version: 1.0
Received: by 10.237.43.166 with HTTP; Sun, 26 Nov 2017 22:29:18 -0800 (PST)
In-Reply-To: <83bmjp6kkt.fsf@HIDDEN>
References: <CACspjXcM1ZPKw7-q_GgV-6xUOqx2QQLRJEsATYFRRE49tKrmsg@HIDDEN>
 <83bmjp6kkt.fsf@HIDDEN>
From: Shuguang Sun <shuguang@HIDDEN>
Date: Mon, 27 Nov 2017 14:29:18 +0800
Message-ID: <CACspjXe7YPju_dZH8oR7F+v_zSmQJnGkF8JjrhKyTBDvWK1w7Q@HIDDEN>
Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with
 Windows 7 and Samba
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="001a114e6508abd702055ef105f6"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 29455
Cc: 29455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--001a114e6508abd702055ef105f6
Content-Type: text/plain; charset="UTF-8"

The debug-on-error is set to t. If setq it to nil, it just raise and error
warning, and will not stop backup.

The ACE for a local file looks like:
"O:S-1-5-21-1213861250-xx-xx-207145G:DUD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1213861250-xx-xx-207145)(A;ID;FA;;;LA)"
(xx masks some numbers)
(S-1-5-21 is SECURITY_NT_NON_UNIQUE, SIDS are not unique.)

I searched online and find that O:S-1-22 is a unix/linux mapped to windows
by samba. And actually in my situation is that I have files in a linux
server, and mapped it as network driver in Windows 7 (maybe by Samba). All
such kind of files (what I can edit) have ACL/SDDL
O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-
79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD).




On Mon, Nov 27, 2017 at 1:01 AM, Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: Shuguang Sun <shuguang@HIDDEN>
> > Date: Sun, 26 Nov 2017 22:59:33 +0800
> >
> > Local: Windows 7
> > GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2017-11-24
> > (backup-by-copying t)
> >
> > File is on a server which is mapped as network driver in Windows 7. It
> seems a samba according to the SID
> > below.
> > The SDDL from file-acl is
> > "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-
> 79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)"
> >
> > After I edited the file and write it, the backup meets error:
> >
> > Debugger entered--Lisp error: (file-error "Setting ACL" "Operation not
> permitted"
> > "c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!
> drive_i!test_fixed_IA_time.r.~2~")
> >   set-file-acl("c:/Users/username/HOME/.emacs.d/
> autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~"
> > "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-
> 79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
> >   set-file-extended-attributes
> > ("c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!
> drive_i!test_fixed_IA_time.r.~2~" ((acl .
> > "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-
> 79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
> > (selinux-context nil nil nil nil)))
> >   backup-buffer-copy("i:/power/permutation_test_fixed_IA_time.r"
> > "c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!
> drive_i!test_fixed_IA_time.r.~2~" 438 ((acl .
> > "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-
> 79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
> > (selinux-context nil nil nil nil)))
> >   backup-buffer()
> >   basic-save-buffer-2()
> >   basic-save-buffer-1()
> >   basic-save-buffer(t)
> >   save-buffer(1)
> >   funcall-interactively(save-buffer 1)
> >   call-interactively(save-buffer nil nil)
> >   command-execute(save-buffer)
>
> Do you have debug-on-error set to non-nil?  In backup-buffer-copy the
> function set-file-extended-attributes is called inside
> with-demoted-errors, so unless debug-on-error is non-nil, the error
> should have been converted to a simple message, and Emacs should have
> felled back to set-file-modes.  Why isn't this happening in your case?
>
> Also, does the following fail with SOME-FILE being a local file?
>
>   M-: set-file-acl("SOME-FILE" "O:S-1-22-1-79077G:S-1-22-2-
> 108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
> RET
>

--001a114e6508abd702055ef105f6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>The debug-on-error is set to t. If setq it to nil, it=
 just raise and error warning, and will not stop backup.<br></div><div><br>=
</div><div>The ACE for a local file looks like:</div><div>&quot;O:S-1-5-21-=
1213861250-xx-xx-207145G:DUD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5=
-21-1213861250-xx-xx-207145)(A;ID;FA;;;LA)&quot;</div><div>(xx masks some n=
umbers)</div><div></div><div>(S-1-5-21 is SECURITY_NT_NON_UNIQUE, SIDS are =
not unique.)</div><div><br></div><div>I searched online and find that O:S-1=
-22 is a unix/linux mapped to windows by samba. And actually in my situatio=
n is that I have files in a linux server, and mapped it as network driver i=
n Windows 7 (maybe by Samba). All such kind of files (what I can edit) have=
 ACL/SDDL O:S-1-22-1-79077G:S-1-22-2-<wbr>108D:P(A;;0x1e01ff;;;S-1-22-1-<wb=
r>79077)(A;;FR;;;S-1-22-2-108)(<wbr>A;;FR;;;WD). </div><div><br></div><div>=
<br></div><div><br></div></div><div class=3D"gmail_extra"><br><div class=3D=
"gmail_quote">On Mon, Nov 27, 2017 at 1:01 AM, Eli Zaretskii <span dir=3D"l=
tr">&lt;<a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a>&=
gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt; From: Shuguang Sun=
 &lt;<a href=3D"mailto:shuguang@HIDDEN">shuguang@HIDDEN</a>&gt;<br>
&gt; Date: Sun, 26 Nov 2017 22:59:33 +0800<br>
&gt;<br>
&gt; Local: Windows 7<br>
&gt; GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2017-11-24<br>
&gt; (backup-by-copying t)<br>
&gt;<br>
&gt; File is on a server which is mapped as network driver in Windows 7. It=
 seems a samba according to the SID<br>
&gt; below.<br>
&gt; The SDDL from file-acl is<br>
&gt; &quot;O:S-1-22-1-79077G:S-1-22-2-<wbr>108D:P(A;;0x1e01ff;;;S-1-22-1-<w=
br>79077)(A;;FR;;;S-1-22-2-108)(<wbr>A;;FR;;;WD)&quot;<br>
&gt;<br>
&gt; After I edited the file and write it, the backup meets error:<br>
&gt;<br>
&gt; Debugger entered--Lisp error: (file-error &quot;Setting ACL&quot; &quo=
t;Operation not permitted&quot;<br>
&gt; &quot;c:/Users/username/HOME/.<wbr>emacs.d/autosave/Rfiles/!<wbr>drive=
_i!test_fixed_IA_time.r.~<wbr>2~&quot;)<br>
&gt;=C2=A0 =C2=A0set-file-acl(&quot;c:/Users/<wbr>username/HOME/.emacs.d/<w=
br>autosave/Rfiles/!drive_i!test_<wbr>fixed_IA_time.r.~2~&quot;<br>
&gt; &quot;O:S-1-22-1-79077G:S-1-22-2-<wbr>108D:P(A;;0x1e01ff;;;S-1-22-1-<w=
br>79077)(A;;FR;;;S-1-22-2-108)(<wbr>A;;FR;;;WD)&quot;)<br>
&gt;=C2=A0 =C2=A0set-file-extended-attributes<br>
&gt; (&quot;c:/Users/username/HOME/.<wbr>emacs.d/autosave/Rfiles/!<wbr>driv=
e_i!test_fixed_IA_time.r.~<wbr>2~&quot; ((acl .<br>
&gt; &quot;O:S-1-22-1-79077G:S-1-22-2-<wbr>108D:P(A;;0x1e01ff;;;S-1-22-1-<w=
br>79077)(A;;FR;;;S-1-22-2-108)(<wbr>A;;FR;;;WD)&quot;)<br>
&gt; (selinux-context nil nil nil nil)))<br>
&gt;=C2=A0 =C2=A0backup-buffer-copy(&quot;i:/power/<wbr>permutation_test_fi=
xed_IA_<wbr>time.r&quot;<br>
&gt; &quot;c:/Users/username/HOME/.<wbr>emacs.d/autosave/Rfiles/!<wbr>drive=
_i!test_fixed_IA_time.r.~<wbr>2~&quot; 438 ((acl .<br>
&gt; &quot;O:S-1-22-1-79077G:S-1-22-2-<wbr>108D:P(A;;0x1e01ff;;;S-1-22-1-<w=
br>79077)(A;;FR;;;S-1-22-2-108)(<wbr>A;;FR;;;WD)&quot;)<br>
&gt; (selinux-context nil nil nil nil)))<br>
&gt;=C2=A0 =C2=A0backup-buffer()<br>
&gt;=C2=A0 =C2=A0basic-save-buffer-2()<br>
&gt;=C2=A0 =C2=A0basic-save-buffer-1()<br>
&gt;=C2=A0 =C2=A0basic-save-buffer(t)<br>
&gt;=C2=A0 =C2=A0save-buffer(1)<br>
&gt;=C2=A0 =C2=A0funcall-interactively(save-<wbr>buffer 1)<br>
&gt;=C2=A0 =C2=A0call-interactively(save-buffer nil nil)<br>
&gt;=C2=A0 =C2=A0command-execute(save-buffer)<br>
<br>
Do you have debug-on-error set to non-nil?=C2=A0 In backup-buffer-copy the<=
br>
function set-file-extended-attributes is called inside<br>
with-demoted-errors, so unless debug-on-error is non-nil, the error<br>
should have been converted to a simple message, and Emacs should have<br>
felled back to set-file-modes.=C2=A0 Why isn&#39;t this happening in your c=
ase?<br>
<br>
Also, does the following fail with SOME-FILE being a local file?<br>
<br>
=C2=A0 M-: set-file-acl(&quot;SOME-FILE&quot; &quot;O:S-1-22-1-79077G:S-1-2=
2-2-<wbr>108D:P(A;;0x1e01ff;;;S-1-22-1-<wbr>79077)(A;;FR;;;S-1-22-2-108)(<w=
br>A;;FR;;;WD)&quot;) RET<br>
</blockquote></div><br></div>

--001a114e6508abd702055ef105f6--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29455; Package emacs. Full text available.

Message received at 29455 <at> debbugs.gnu.org:


Received: (at 29455) by debbugs.gnu.org; 26 Nov 2017 17:01:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 26 12:01:30 2017
Received: from localhost ([127.0.0.1]:59538 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eJ0J8-0002e8-Ap
	for submit <at> debbugs.gnu.org; Sun, 26 Nov 2017 12:01:30 -0500
Received: from eggs.gnu.org ([208.118.235.92]:52614)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1eJ0J7-0002dw-Je
 for 29455 <at> debbugs.gnu.org; Sun, 26 Nov 2017 12:01:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1eJ0Iz-00044T-Cr
 for 29455 <at> debbugs.gnu.org; Sun, 26 Nov 2017 12:01:24 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44320)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1eJ0Iz-00044O-9Y; Sun, 26 Nov 2017 12:01:21 -0500
Received: from [176.228.60.248] (port=1051 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1eJ0Iy-0001ae-Of; Sun, 26 Nov 2017 12:01:21 -0500
Date: Sun, 26 Nov 2017 19:01:06 +0200
Message-Id: <83bmjp6kkt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Shuguang Sun <shuguang@HIDDEN>
In-reply-to: <CACspjXcM1ZPKw7-q_GgV-6xUOqx2QQLRJEsATYFRRE49tKrmsg@HIDDEN>
 (message from Shuguang Sun on Sun, 26 Nov 2017 22:59:33 +0800)
Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with
 Windows 7 and Samba
References: <CACspjXcM1ZPKw7-q_GgV-6xUOqx2QQLRJEsATYFRRE49tKrmsg@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 29455
Cc: 29455 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Shuguang Sun <shuguang@HIDDEN>
> Date: Sun, 26 Nov 2017 22:59:33 +0800
> 
> Local: Windows 7
> GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2017-11-24
> (backup-by-copying t)
> 
> File is on a server which is mapped as network driver in Windows 7. It seems a samba according to the SID
> below.
> The SDDL from file-acl is 
> "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)"
> 
> After I edited the file and write it, the backup meets error:
> 
> Debugger entered--Lisp error: (file-error "Setting ACL" "Operation not permitted"
> "c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~")
>   set-file-acl("c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~"
> "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
>   set-file-extended-attributes
> ("c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~" ((acl .
> "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
> (selinux-context nil nil nil nil)))
>   backup-buffer-copy("i:/power/permutation_test_fixed_IA_time.r"
> "c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~" 438 ((acl .
> "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
> (selinux-context nil nil nil nil)))
>   backup-buffer()
>   basic-save-buffer-2()
>   basic-save-buffer-1()
>   basic-save-buffer(t)
>   save-buffer(1)
>   funcall-interactively(save-buffer 1)
>   call-interactively(save-buffer nil nil)
>   command-execute(save-buffer)

Do you have debug-on-error set to non-nil?  In backup-buffer-copy the
function set-file-extended-attributes is called inside
with-demoted-errors, so unless debug-on-error is non-nil, the error
should have been converted to a simple message, and Emacs should have
felled back to set-file-modes.  Why isn't this happening in your case?

Also, does the following fail with SOME-FILE being a local file?

  M-: set-file-acl("SOME-FILE" "O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)") RET




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29455; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Nov 2017 14:59:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 26 09:59:46 2017
Received: from localhost ([127.0.0.1]:59436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eIyPJ-0004Kp-Pa
	for submit <at> debbugs.gnu.org; Sun, 26 Nov 2017 09:59:46 -0500
Received: from eggs.gnu.org ([208.118.235.92]:52907)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <shuguang@HIDDEN>) id 1eIyPI-0004Kc-4t
 for submit <at> debbugs.gnu.org; Sun, 26 Nov 2017 09:59:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <shuguang@HIDDEN>) id 1eIyPB-0007TT-P6
 for submit <at> debbugs.gnu.org; Sun, 26 Nov 2017 09:59:38 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:36056)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <shuguang@HIDDEN>) id 1eIyPB-0007TP-Lo
 for submit <at> debbugs.gnu.org; Sun, 26 Nov 2017 09:59:37 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43878)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <shuguang@HIDDEN>) id 1eIyPA-0004Nb-CC
 for bug-gnu-emacs@HIDDEN; Sun, 26 Nov 2017 09:59:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <shuguang@HIDDEN>) id 1eIyP9-0007SG-D7
 for bug-gnu-emacs@HIDDEN; Sun, 26 Nov 2017 09:59:36 -0500
Received: from mail-qt0-x22c.google.com ([2607:f8b0:400d:c0d::22c]:35042)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <shuguang@HIDDEN>) id 1eIyP9-0007S5-7b
 for bug-gnu-emacs@HIDDEN; Sun, 26 Nov 2017 09:59:35 -0500
Received: by mail-qt0-x22c.google.com with SMTP id n32so36249246qtb.2
 for <bug-gnu-emacs@HIDDEN>; Sun, 26 Nov 2017 06:59:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=ZAS96fWP2I4jqHF9Kwvc6VnqdgHzgfJq+KTzErtQL+8=;
 b=ovESA+fGncUZJFaCfKmdcxaCy9nv6PivVQg/ALiG6r0ic3OFO0xkCc5XsMqRFM16oH
 SftCMdu3VZXIN6DbiEG27mWw1kAwy5X0DKPEcUcwvt9rZdCt+IgZXiOzvmZryCUVUY01
 nUM9+tCSxHsW5O+NI9IvEyBX1by72kVVOFe0RcY833GzIcjuRR50gXK7L09IL7vLehCh
 h2f4Cm27MrAHZrz6gCvn/LhKe+5WxPXOCZOmNV2mDBS+bj6xAe7D+e/US9Za5MgxbhoH
 wdj62myDjLqdF+va83/XrgdYXETUIg2PIgBTpHFKrb8ebBhHkW4JvIGkyhBRAJxVHUy9
 eoyg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=ZAS96fWP2I4jqHF9Kwvc6VnqdgHzgfJq+KTzErtQL+8=;
 b=lZdK2uN04sKC+IGQIDm530Jh0VAzhLnuPe/s+JPXMxL5/spX1qWLh+mKcfarzKzPLb
 VxcR3ESDHBSWuEBPfthZdCGU5mq50Zbqj9/h9kSLGljIgzWgta3SRriOdQW2Yy82o3RA
 S4MKBB/9xyCf9j4cjqfuJKpOwK3Zd0H9Vx76FN4B0eNBF0tUPK00ajEQke6KVsWvPY5W
 wDljfA+KOEsaRMf03zZ2uumvPWdJVDQ8iWRfBl5A9iOI7Zi7GCZImCLBNprRDP2QzCV+
 cRvQmtKGw9crqbPf2a1vwiMkzTKAb4yIHYNmh5BQ6fOJARds0qi95M1g8jT63iu+br00
 qFug==
X-Gm-Message-State: AJaThX4dZvBCogoN5E9KU8Ag4nst0JOyqelhiM8KSM5qVxbs6nKBU2Uf
 86ZTRAlPjiChulIHokYUTuOaV9ukeeM32oDw3zmqjw==
X-Google-Smtp-Source: AGs4zMZINnR7q/YtunSBTBdxr/+v/J/MHIody6RkHHi2ofZuq7Rtx8la6tQa99w4qeSKXa8FYzQ1AtRV7YkxPYsh2Y4=
X-Received: by 10.200.24.83 with SMTP id n19mr10488431qtk.263.1511708374418;
 Sun, 26 Nov 2017 06:59:34 -0800 (PST)
MIME-Version: 1.0
Received: by 10.237.43.166 with HTTP; Sun, 26 Nov 2017 06:59:33 -0800 (PST)
From: Shuguang Sun <shuguang@HIDDEN>
Date: Sun, 26 Nov 2017 22:59:33 +0800
Message-ID: <CACspjXcM1ZPKw7-q_GgV-6xUOqx2QQLRJEsATYFRRE49tKrmsg@HIDDEN>
Subject: backup-by-copying ACL Operation not permitted with Windows 7 and Samba
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="94eb2c050f74a949e7055ee4086a"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--94eb2c050f74a949e7055ee4086a
Content-Type: text/plain; charset="UTF-8"

Hi,

Local: Windows 7
GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2017-11-24
(backup-by-copying t)

File is on a server which is mapped as network driver in Windows 7. It
seems a samba according to the SID below.
The SDDL from file-acl is
"O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)"

After I edited the file and write it, the backup meets error:

Debugger entered--Lisp error: (file-error "Setting ACL" "Operation not
permitted"
"c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~")

set-file-acl("c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~"
"O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")

set-file-extended-attributes("c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~"
((acl .
"O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
(selinux-context nil nil nil nil)))
  backup-buffer-copy("i:/power/permutation_test_fixed_IA_time.r"
"c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~"
438 ((acl .
"O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)")
(selinux-context nil nil nil nil)))
  backup-buffer()
  basic-save-buffer-2()
  basic-save-buffer-1()
  basic-save-buffer(t)
  save-buffer(1)
  funcall-interactively(save-buffer 1)
  call-interactively(save-buffer nil nil)
  command-execute(save-buffer)

The ACL of a local file looks like:
"O:S-1-5-21-1213861250-xxx-207145G:DUD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1213861250-xx-207145)(A;ID;FA;;;LA)"

I think it is a bug because:
1. I have the write access to the mapped network driver
2. If I copy a local file to the mapped network driver, the ACL would be
set up well.
So I don't think there should be a write permission in this backup case.


Best Regards
Shuguang Sun

--94eb2c050f74a949e7055ee4086a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi,</div><div><br></div><div><div>Local: Windows 7</d=
iv>GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2017-11-24<div>(backu=
p-by-copying t)</div><div><br></div><div>File is on a server which is mappe=
d as network driver in Windows 7. It seems a samba according to the SID bel=
ow.</div><div>The SDDL from file-acl is <br></div><div>&quot;O:S-1-22-1-790=
77G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;=
FR;;;WD)&quot;</div><div><br></div><div>After I edited the file and write i=
t, the backup meets error:</div><div><br>Debugger entered--Lisp error: (fil=
e-error &quot;Setting ACL&quot; &quot;Operation not permitted&quot; &quot;c=
:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.=
r.~2~&quot;)<br>=C2=A0 set-file-acl(&quot;c:/Users/username/HOME/.emacs.d/a=
utosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~&quot; &quot;O:S-1-22-1-790=
77G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;=
FR;;;WD)&quot;)<br>=C2=A0 set-file-extended-attributes(&quot;c:/Users/usern=
ame/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~&quot; (=
(acl . &quot;O:S-1-22-1-79077G:S-1-22-2-108D:P(A;;0x1e01ff;;;S-1-22-1-79077=
)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)&quot;) (selinux-context nil nil nil nil=
)))<br>=C2=A0 backup-buffer-copy(&quot;i:/power/permutation_test_fixed_IA_t=
ime.r&quot; &quot;c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!=
test_fixed_IA_time.r.~2~&quot; 438 ((acl . &quot;O:S-1-22-1-79077G:S-1-22-2=
-108D:P(A;;0x1e01ff;;;S-1-22-1-79077)(A;;FR;;;S-1-22-2-108)(A;;FR;;;WD)&quo=
t;) (selinux-context nil nil nil nil)))<br>=C2=A0 backup-buffer()<br>=C2=A0=
 basic-save-buffer-2()<br>=C2=A0 basic-save-buffer-1()<br>=C2=A0 basic-save=
-buffer(t)<br>=C2=A0 save-buffer(1)<br>=C2=A0 funcall-interactively(save-bu=
ffer 1)<br>=C2=A0 call-interactively(save-buffer nil nil)<br>=C2=A0 command=
-execute(save-buffer)<br></div><div><br></div><div>The ACL of a local file =
looks like:</div><div>&quot;O:S-1-5-21-1213861250-xxx-207145G:DUD:AI(A;ID;F=
A;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1213861250-xx-207145)(A;ID;FA;;;LA=
)&quot;</div><div><br></div><div>I think it is a bug because:</div><div>1. =
I have the write access to the mapped network driver</div><div>2. If I copy=
 a local file to the mapped network driver, the ACL would be set up well.</=
div><div>So I don&#39;t think there should be a write permission in this ba=
ckup case.<br></div><div><br></div><div><br></div><div>Best Regards</div><d=
iv>Shuguang Sun<br></div><div><br></div><div><br></div><div><br></div><div>=
<br></div></div></div>

--94eb2c050f74a949e7055ee4086a--




Acknowledgement sent to Shuguang Sun <shuguang@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#29455; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 28 Nov 2017 17:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.