unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Shuguang Sun <shuguang@gmail.com>, 29225@debbugs.gnu.org
Subject: bug#29225: Tramp backup-by-copying in a Converting ACL Invalid argument error on Windows 7
Date: Fri, 10 Nov 2017 13:41:04 +0100	[thread overview]
Message-ID: <87bmkal31b.fsf@gmx.de> (raw)
In-Reply-To: <83lgjfqsjt.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Nov 2017 19:18:46 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

>> Debugger entered--Lisp error: (file-error "Converting ACL" "Invalid argument"
>> "c:/Users/user/HOME/.emacs.d/autosave/Rfiles/!drive_c!plink!!user@host!!!path!user!Ava!_mortality.R.~1~")
>> 
>>   set-file-acl
>> ("c:/Users/user/HOME/.emacs.d/autosave/Rfiles/!drive_c!plink!!user@host!!!path!user!Ava!_mortality.R.~1~"
>> "user::rw-\ngroup::rw-\nother::r--\n")
>>   set-file-extended-attributes
>> ("c:/Users/user/HOME/.emacs.d/autosave/Rfiles/!drive_c!plink!!user@host!!!path!user!Ava!_mortality.R.~1~"
>> ((acl . "user::rw-\ngroup::rw-\nother::r--\n") (selinux-context nil nil nil nil)))
>>   backup-buffer-copy("/plink:user@host:/path/user/Ava/_mortality.R"
>> "c:/Users/user/HOME/.emacs.d/autosave/Rfiles/!drive_c!plink!!user@host!!!path!user!Ava!_mortality.R.~1~"
>> 436 ((acl . "user::rw-\ngroup::rw-\nother::r--\n") (selinux-context nil nil nil nil)))
>
> This seems to indicate that Unix-style ACLs are passed to native
> Windows ACL functions, which won't work.  Michael, could you please
> look into this?  I'd expect ACLs derived from remote files never to be
> used on local files.

And vice versa.

However, Tramp has no chance to do something here. It offers own
implementations of `file-acl' and `set-file-acl'; both functions don't
know where the returned ACL shall be used (´file-acl'), or where the ACL
comes from (`set-file-acl'). Therefore, the docstring of `set-file-acl'
says

"Value is t if setting of ACL was successful, nil otherwise."

The error message "Converting ACL" "Invalid argument" comes from
Ffile_acl of fileio.c. It *raises* an error instead of silently
returning Qnil, as advertised by the docstring. A similar wrong
behaviour I've found in `tramp-smb-handle-set-file-acl'.

I would convert both functions to return nil instead of raising an
error, in the emacs-26 branch. Any objection?

> Thanks.

Best regards, Michael.





  reply	other threads:[~2017-11-10 12:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09  8:24 bug#29225: Tramp backup-by-copying in a Converting ACL Invalid argument error on Windows 7 Shuguang Sun
2017-11-09 17:18 ` Eli Zaretskii
2017-11-10 12:41   ` Michael Albinus [this message]
2017-11-10 13:06     ` Eli Zaretskii
2017-11-10 14:39       ` Michael Albinus
2017-11-10 15:13         ` Eli Zaretskii
2017-11-12 13:21           ` Michael Albinus
2018-01-17 10:05             ` Michael Albinus

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=87bmkal31b.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=29225@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=shuguang@gmail.com \
    /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).