From: Shuguang Sun <shuguang@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29455@debbugs.gnu.org
Subject: bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba
Date: Mon, 27 Nov 2017 14:29:18 +0800 [thread overview]
Message-ID: <CACspjXe7YPju_dZH8oR7F+v_zSmQJnGkF8JjrhKyTBDvWK1w7Q@mail.gmail.com> (raw)
In-Reply-To: <83bmjp6kkt.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 3159 bytes --]
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 <eliz@gnu.org> 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" "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
>
[-- Attachment #2: Type: text/html, Size: 4174 bytes --]
next prev parent reply other threads:[~2017-11-27 6:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-26 14:59 bug#29455: backup-by-copying ACL Operation not permitted with Windows 7 and Samba Shuguang Sun
2017-11-26 17:01 ` Eli Zaretskii
2017-11-27 6:29 ` Shuguang Sun [this message]
2017-11-27 15:52 ` Eli Zaretskii
2017-11-28 9:11 ` Shuguang Sun
2017-11-28 10:43 ` Shuguang Sun
2017-11-28 15:23 ` Shuguang Sun
2017-11-28 17:28 ` Eli Zaretskii
2019-09-29 0:11 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACspjXe7YPju_dZH8oR7F+v_zSmQJnGkF8JjrhKyTBDvWK1w7Q@mail.gmail.com \
--to=shuguang@gmail.com \
--cc=29455@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).