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 23:23:34 +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="001a114d345a31897b055f0c9a62" X-Trace: blaine.gmane.org 1511882665 11409 195.159.176.226 (28 Nov 2017 15:24:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Nov 2017 15:24:25 +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 16:24:16 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 1eJhk3-00020T-77 for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Nov 2017 16:24:11 +0100 Original-Received: from localhost ([::1]:38455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJhkA-0006OU-IT for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Nov 2017 10:24:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJhk0-0006OI-9g for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 10:24:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJhju-0006Dw-31 for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 10:24:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54332) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJhjt-0006Ds-UZ for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 10:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eJhjt-0007ka-LH for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 10:24:01 -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 15:24:01 +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.151188262329767 (code B ref 29455); Tue, 28 Nov 2017 15:24:01 +0000 Original-Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 15:23:43 +0000 Original-Received: from localhost ([127.0.0.1]:34780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJhja-0007k2-Pm for submit@debbugs.gnu.org; Tue, 28 Nov 2017 10:23:43 -0500 Original-Received: from mail-qk0-f176.google.com ([209.85.220.176]:42086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJhjY-0007jo-Dn for 29455@debbugs.gnu.org; Tue, 28 Nov 2017 10:23:40 -0500 Original-Received: by mail-qk0-f176.google.com with SMTP id a71so226898qkc.9 for <29455@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) Original-Received: by 10.237.43.166 with HTTP; Tue, 28 Nov 2017 07:23:34 -0800 (PST) In-Reply-To: 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:140487 Archived-At: --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 wrote: > > > 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-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
3.
(set-file-acl "subtitle.txt" &= 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)")
return t.
It changes the group or user of the file subtitle.txt, and keep only &qu= ot;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&qu= ot;, 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@gmail.com> wrote:

On Mon, Nov 27, 2017 at 11:52 = PM, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Shuguang Sun= <shuguang@gmail= .com>
> Date: Mon, 27 Nov 2017 14:29:18 +0800
> Cc: 29455@d= ebbugs.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)"<= br> > (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)(A= ;;FR;;;WD)") RET

It raises the same error message:
<= div>(file-error "Setting ACL" "Operation not permitted"= "c:/Users/username/Documents/base/subtitle.txt")
=
or
eval: Setting ACL: Operation no= t 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:A= I(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1213861250-xx-20= 7145)(A;ID;FA;;;LA)" is from local drive where I have full read/w= rite 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.


--001a114d345a31897b055f0c9a62--