From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Shuguang Sun Newsgroups: gmane.emacs.bugs Subject: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba Date: Tue, 28 Nov 2017 18:43:53 +0800 Message-ID: References: <83bmjp6kkt.fsf@gnu.org> <83wp2b67nq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11482b1cf4784c055f08b193" X-Trace: blaine.gmane.org 1511865928 31836 195.159.176.226 (28 Nov 2017 10:45:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Nov 2017 10:45:28 +0000 (UTC) Cc: 29455@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 28 11:45:24 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJdO6-0007Kk-BQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Nov 2017 11:45:14 +0100 Original-Received: from localhost ([::1]:37043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJdOD-0002Pu-JE for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Nov 2017 05:45:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJdO0-0002MG-Sq for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 05:45:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJdNu-0006QU-KI for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 05:45:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53086) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJdNu-0006QO-GL for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 05:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eJdNu-0007NK-6v for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 05:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Shuguang Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Nov 2017 10:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29455 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29455-submit@debbugs.gnu.org id=B29455.151186584228259 (code B ref 29455); Tue, 28 Nov 2017 10:45:02 +0000 Original-Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 10:44:02 +0000 Original-Received: from localhost ([127.0.0.1]:33534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJdMv-0007Lf-Fl for submit@debbugs.gnu.org; Tue, 28 Nov 2017 05:44:02 -0500 Original-Received: from mail-qk0-f181.google.com ([209.85.220.181]:34954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJdMt-0007LH-54 for 29455@debbugs.gnu.org; Tue, 28 Nov 2017 05:43:59 -0500 Original-Received: by mail-qk0-f181.google.com with SMTP id p19so36393683qke.2 for <29455@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) Original-Received: by 10.237.43.166 with HTTP; Tue, 28 Nov 2017 02:43:53 -0800 (PST) In-Reply-To: <83wp2b67nq.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:140484 Archived-At: --001a11482b1cf4784c055f08b193 Content-Type: text/plain; charset="UTF-8" On Mon, Nov 27, 2017 at 11:52 PM, Eli Zaretskii wrote: > > From: Shuguang Sun > > Date: Mon, 27 Nov 2017 14:29:18 +0800 > > Cc: 29455@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


On Mon, Nov 27, 2017 at 11:52 PM, Eli Zaretskii <<= a href=3D"mailto:eliz@gnu.org" target=3D"_blank">eliz@gnu.org> wrote:
> From: Sh= uguang Sun <shuguang@gmail.com= >
> Date: Mon, 27 Nov 2017 14:29:18 +0800
> Cc: 29455@debbugs.gnu.org=
>
> 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.

May I ask why do you have it set to t?=C2=A0 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)&q= uot;
> (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.=C2=A0 I asked you to create= a local
file (which I call "SOME-FILE" below, replace that with the actua= l
name of the file), and then type this inside Emacs:

=C2=A0 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)(<= wbr>A;;FR;;;WD)") RET

It rais= es the same error message:
(file-error "Setting A= CL" "Operation not permitted" "c:/Users/username/Docume= nts/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-2= 2-1-79077G:S-1-22-2-108" is from DACL in network drive; "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)" is from local drive where I have full read/write access.

=C2=A0

(This is one long line.)=C2=A0 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 u= ser
is unable to acquire the privileges needed for setting the DACL of a
file on your local disk.=C2=A0 Or it could mean some other problem.=C2=A0 T= he
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 win= dows by samba. And actually in my
> situation is that I have files in a linux server, and mapped it as net= work driver in Windows 7 (maybe by
> Samba). All such kind of files (what I can edit) have ACL/SDDL O:S-1-2= 2-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 th= e
failure happens when Emacs tries to set the DACL of the backup file,
which is stored on your local disk drive.

--001a11482b1cf4784c055f08b193--