From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba Date: Sun, 29 Sep 2019 02:11:45 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="63808"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 29455-done@debbugs.gnu.org, Shuguang Sun To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 29 02:13:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iEMpu-000GO7-22 for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 02:13:14 +0200 Original-Received: from localhost ([::1]:35522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEMps-0004Tt-6A for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Sep 2019 20:13:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48045) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEMpk-0004Tj-97 for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2019 20:13:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEMpj-0001Yk-45 for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2019 20:13:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42770) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iEMpj-0001YN-0Q for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2019 20:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iEMpi-00006c-Oa for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2019 20:13:02 -0400 In-Reply-To: Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2019 00:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 29455 X-GNU-PR-Package: emacs Mail-Followup-To: 29455@debbugs.gnu.org, stefan@marxist.se, shuguang@gmail.com Original-Received: via spool by 29455-done@debbugs.gnu.org id=D29455.1569715923308 (code D ref 29455); Sun, 29 Sep 2019 00:13:02 +0000 Original-Received: (at 29455-done) by debbugs.gnu.org; 29 Sep 2019 00:12:03 +0000 Original-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 Original-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 Original-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) 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: 209.51.188.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:167550 Archived-At: 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