From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 09:59:46 2017 Received: (at submit) by debbugs.gnu.org; 26 Nov 2017 14:59:46 +0000 Received: from localhost ([127.0.0.1]:59436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIyPJ-0004Kp-Pa for submit@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 ) id 1eIyPI-0004Kc-4t for submit@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 ) id 1eIyPB-0007TT-P6 for submit@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 ) id 1eIyPB-0007TP-Lo for submit@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 ) id 1eIyPA-0004Nb-CC for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 09:59:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIyP9-0007SG-D7 for bug-gnu-emacs@gnu.org; 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 ) id 1eIyP9-0007S5-7b for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 09:59:35 -0500 Received: by mail-qt0-x22c.google.com with SMTP id n32so36249246qtb.2 for ; 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 Date: Sun, 26 Nov 2017 22:59:33 +0800 Message-ID: Subject: backup-by-copying ACL Operation not permitted with Windows 7 and Samba To: bug-gnu-emacs@gnu.org 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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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
Hi,

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

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.
The SDDL from file-acl is
"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)"

After I edited the file and write i= t, the backup meets error:

Debugger entered--Lisp error: (fil= e-error "Setting ACL" "Operation not permitted" "c= :/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive_i!test_fixed_IA_time.= r.~2~")
=C2=A0 set-file-acl("c:/Users/username/HOME/.emacs.d/a= utosave/Rfiles/!drive_i!test_fixed_IA_time.r.~2~" "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)")
=C2=A0 set-file-extended-attributes("c:/Users/usern= ame/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= )))
=C2=A0 backup-buffer-copy("i:/power/permutation_test_fixed_IA_t= ime.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)&quo= t;) (selinux-context nil nil nil nil)))
=C2=A0 backup-buffer()
=C2=A0= basic-save-buffer-2()
=C2=A0 basic-save-buffer-1()
=C2=A0 basic-save= -buffer(t)
=C2=A0 save-buffer(1)
=C2=A0 funcall-interactively(save-bu= ffer 1)
=C2=A0 call-interactively(save-buffer nil nil)
=C2=A0 command= -execute(save-buffer)

The ACL of a local file = looks like:
"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= )"

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 ba= ckup case.


Best Regards
Shuguang Sun



=
--94eb2c050f74a949e7055ee4086a-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 12:01:30 2017 Received: (at 29455) by debbugs.gnu.org; 26 Nov 2017 17:01:30 +0000 Received: from localhost ([127.0.0.1]:59538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ0J8-0002e8-Ap for submit@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 ) id 1eJ0J7-0002dw-Je for 29455@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 ) id 1eJ0Iz-00044T-Cr for 29455@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Shuguang Sun In-reply-to: (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: 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Shuguang Sun > 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 01:29:26 2017 Received: (at 29455) by debbugs.gnu.org; 27 Nov 2017 06:29:26 +0000 Received: from localhost ([127.0.0.1]:59941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJCv0-0006PZ-CY for submit@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 ) id 1eJCuy-0006PL-9o for 29455@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@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@gnu.org> References: <83bmjp6kkt.fsf@gnu.org> From: Shuguang Sun Date: Mon, 27 Nov 2017 14:29:18 +0800 Message-ID: Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba To: Eli Zaretskii Content-Type: multipart/alternative; boundary="001a114e6508abd702055ef105f6" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29455 Cc: 29455@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 wrote: > > From: Shuguang Sun > > 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
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 n= umbers)
(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 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-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@gnu.org&= gt; wrote:
> From: Shuguang Sun= <shuguang@gmail.com>
> 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" &quo= t;Operation not permitted"
> "c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!drive= _i!test_fixed_IA_time.r.~2~")
>=C2=A0 =C2=A0set-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)")
>=C2=A0 =C2=A0set-file-extended-attributes
> ("c:/Users/username/HOME/.emacs.d/autosave/Rfiles/!driv= e_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)))
>=C2=A0 =C2=A0backup-buffer-copy("i:/power/permutation_test_fi= xed_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)))
>=C2=A0 =C2=A0backup-buffer()
>=C2=A0 =C2=A0basic-save-buffer-2()
>=C2=A0 =C2=A0basic-save-buffer-1()
>=C2=A0 =C2=A0basic-save-buffer(t)
>=C2=A0 =C2=A0save-buffer(1)
>=C2=A0 =C2=A0funcall-interactively(save-buffer 1)
>=C2=A0 =C2=A0call-interactively(save-buffer nil nil)
>=C2=A0 =C2=A0command-execute(save-buffer)

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
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.=C2=A0 Why isn't this happening in your c= ase?

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

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

--001a114e6508abd702055ef105f6-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 10:52:49 2017 Received: (at 29455) by debbugs.gnu.org; 27 Nov 2017 15:52:49 +0000 Received: from localhost ([127.0.0.1]:32868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJLiD-0005Q1-9H for submit@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 ) id 1eJLiC-0005Po-4q for 29455@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 ) id 1eJLi1-0004j4-59 for 29455@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Shuguang Sun In-reply-to: (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: <83bmjp6kkt.fsf@gnu.org> 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > 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 (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. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 28 04:11:42 2017 Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 09:11:42 +0000 Received: from localhost ([127.0.0.1]:33469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJbvZ-0005BJ-MR for submit@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 ) id 1eJbvY-0005B7-EH for 29455@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@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@gnu.org> References: <83bmjp6kkt.fsf@gnu.org> <83wp2b67nq.fsf@gnu.org> From: Shuguang Sun Date: Tue, 28 Nov 2017 17:11:34 +0800 Message-ID: Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba To: Eli Zaretskii Content-Type: multipart/alternative; boundary="001a1147603cd45fc8055f076738" X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 29455 Cc: 29455@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --001a1147603cd45fc8055f076738 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. > 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


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.
It is a long history and I can't reca= ll 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)&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

(This is one long line.)=C2=A0 Then tell me if this succeeded or signaled an error.
It raises the same error message:
=
(file-error "Setting ACL" "Operation not perm= itted" "c:/Users/username/Documents/base/subtitle.txt")

eval: Setting ACL: Operation not permitted, c:/Users/u= sername/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 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.
It copies th= e DACL from the file in the network drive. I don'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 O:S-1-22-1= =C2=A0 to
O:S-1-5-= 21, vise versa. The owner (O:S-) changes.

=
--001a1147603cd45fc8055f076738-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 28 05:44:02 2017 Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 10:44:02 +0000 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 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 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) 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@gnu.org> References: <83bmjp6kkt.fsf@gnu.org> <83wp2b67nq.fsf@gnu.org> From: Shuguang Sun Date: Tue, 28 Nov 2017 18:43:53 +0800 Message-ID: Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba To: Eli Zaretskii Content-Type: multipart/alternative; boundary="001a11482b1cf4784c055f08b193" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29455 Cc: 29455@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --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-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 28 10:23:43 2017 Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 15:23:43 +0000 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 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 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) MIME-Version: 1.0 Received: by 10.237.43.166 with HTTP; Tue, 28 Nov 2017 07:23:34 -0800 (PST) In-Reply-To: References: <83bmjp6kkt.fsf@gnu.org> <83wp2b67nq.fsf@gnu.org> From: Shuguang Sun Date: Tue, 28 Nov 2017 23:23:34 +0800 Message-ID: Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba To: Eli Zaretskii Content-Type: multipart/alternative; boundary="001a114d345a31897b055f0c9a62" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29455 Cc: 29455@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 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-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 28 12:28:38 2017 Received: (at 29455) by debbugs.gnu.org; 28 Nov 2017 17:28:39 +0000 Received: from localhost ([127.0.0.1]:34960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJjgU-0004DT-Nf for submit@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 ) id 1eJjgT-0004DC-Np for 29455@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 ) id 1eJjgJ-0006zM-H9 for 29455@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 ) 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 ) 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@gnu.org> From: Eli Zaretskii To: Shuguang Sun In-reply-to: (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: <83bmjp6kkt.fsf@gnu.org> <83wp2b67nq.fsf@gnu.org> 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@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Shuguang Sun > Date: Tue, 28 Nov 2017 18:43:53 +0800 > Cc: 29455@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. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 28 20:12:03 2019 Received: (at 29455-done) by debbugs.gnu.org; 29 Sep 2019 00:12:03 +0000 Received: from localhost ([127.0.0.1]:51589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEMol-00004t-EE for submit@debbugs.gnu.org; Sat, 28 Sep 2019 20:12:03 -0400 Received: from mail-pf1-f174.google.com ([209.85.210.174]:37532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEMoj-0008W1-OI for 29455-done@debbugs.gnu.org; Sat, 28 Sep 2019 20:12:02 -0400 Received: by mail-pf1-f174.google.com with SMTP id y5so3511815pfo.4 for <29455-done@debbugs.gnu.org>; Sat, 28 Sep 2019 17:12:01 -0700 (PDT) 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:cc; bh=L4XqU3GCb2bzWohWvui2Lj0xfyHD0DhSbO7ZFDJm/Js=; b=S1opLkQkY8rk/SUn6I7wNPUGPkmQcNMCexgs53uZ4HQKYcCDXjoL6n1UO1KmI0uYLS MRU8IHhL1UYu6ai7RXQTI9/ZqL1qYY6GbneOJwBXRfg2CP3EcrijhkIpQuTOk74+7EpZ 7Fs5oLtUNENQ+PyehwYmIZJvmLBonICZk53TSMoFPguVVYq9doV2Ha9RDhkmjpAdlZcY NzmyAeCu5ce2PO2fuH/hJyFUhWzm3ls+7udJZD2PGhffFJzejuYlvpA4CipcWAGvLGHO sTBqQQW5tGUrUoNAewiTBac8Zox/JusBo3RlNw3vM7RdfbMab8SuxUjBaM18UE4IDRa6 GGrw== X-Gm-Message-State: APjAAAXVLrmbvPMTxYpmjkB9vLMQbHPvIYfje3Jj2Jk95Un07qByQZLG 6eI54UOQR5ZXRmUgqEYNN3AteXu4xJ9FHdrAqW8= X-Google-Smtp-Source: APXvYqwxFOEIaBJwqDzdWx4KUCmqw2ULykUDmY3iQ+F/J/FDwPFK/TEzw3KoobAiNGbEu3qjH3VHFWDuuWPjkhwdtsU= X-Received: by 2002:a17:90a:cc08:: with SMTP id b8mr18656719pju.119.1569715916059; Sat, 28 Sep 2019 17:11:56 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Sun, 29 Sep 2019 02:11:45 +0200 Message-ID: Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 29455-done Cc: 29455-done@debbugs.gnu.org, Shuguang Sun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Eli Zaretskii writes: >> From: Shuguang Sun >> Date: Tue, 28 Nov 2017 18:43:53 +0800 >> Cc: 29455@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. According to the above, this bug should be closed. I'm doing so now. Best regards, Stefan Kangas From unknown Wed Aug 20 05:15:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 27 Oct 2019 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator