|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#29455: closed (backup-by-copying ACL Operation not permitted with Windows 7 and Samba) |
Date: | Sun, 29 Sep 2019 00:13:02 +0000 |
Your message dated Sun, 29 Sep 2019 02:11:45 +0200 with message-id <CADwFkmmj01ARRt+UKc4uWOBd78BeAPHFf82BWrPNJ4p=address@hidden> and subject line Re: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba has caused the debbugs.gnu.org bug report #29455, regarding backup-by-copying ACL Operation not permitted with Windows 7 and Samba to be marked as done. (If you believe you have received this mail in error, please contact address@hidden.) -- 29455: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29455 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: backup-by-copying ACL Operation not permitted with Windows 7 and Samba Date: Sun, 26 Nov 2017 22:59:33 +0800 Hi,Local: Windows 7GNU 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 driver2. 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 RegardsShuguang Sun
--- End Message ---
--- Begin Message ---Subject: Re: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba Date: Sun, 29 Sep 2019 02:11:45 +0200 Eli Zaretskii <address@hidden> writes: >> From: Shuguang Sun <address@hidden> >> Date: Tue, 28 Nov 2017 18:43:53 +0800 >> Cc: address@hidden >> >> 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
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |