[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 9d626df: Add 'nofollow' flag to set-file-modes etc.

From: Michael Albinus
Subject: Re: master 9d626df: Add 'nofollow' flag to set-file-modes etc.
Date: Mon, 24 Feb 2020 14:52:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

address@hidden (Paul Eggert) writes:

Hi Paul,

>     Add 'nofollow' flag to set-file-modes etc.

>     * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes):
>     * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes):
>     * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes):
>     * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes):
>     Accept an optional FLAG arg that is currently ignored,
>     and add a FIXME comment for it.

I'm currently working on this, and I have problems. For
tramp-adb-handle-set-file-modes and tramp-smb-handle-set-file-modes we
can simply ignore the flag, because the clients ("adb shell" and
"smbclient") do not support such an option for chmod. And I don't expect
they will support it in near future.

However, for POSIX shells it is different. FreeBSD supports the "chmod
-h" argument, which implements nofollow. See
<https://www.freebsd.org/cgi/man.cgi?chmod>. I could check for this
argument, and use if possible.

But what shall I do if the target system runs GNU/Linux? chmod(1) does
not offer any comparable argument. Shall I simply ignore nofollow there?

Does anybody know, whether there are plans to extend chmod accordingly,
for example the version in coreutils? Or is there an alternative
possiblity to change the permission of the symbolic link?

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]