Function: tramp-sh-handle-set-file-modes
tramp-sh-handle-set-file-modes is a byte-compiled function defined in
tramp-sh.el.gz.
Signature
(tramp-sh-handle-set-file-modes FILENAME MODE &optional FLAG)
Documentation
Like set-file-modes for Tramp files.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-sh.el.gz
(defun tramp-sh-handle-set-file-modes (filename mode &optional flag)
"Like `set-file-modes' for Tramp files."
;; We need "chmod -h" when the flag is set.
(when (or (not (eq flag 'nofollow))
(not (file-symlink-p filename))
(tramp-get-remote-chmod-h (tramp-dissect-file-name filename)))
(tramp-skeleton-set-file-modes-times-uid-gid filename
;; FIXME: extract the proper text from chmod's stderr.
(tramp-barf-unless-okay
v
(format
"chmod %s %o %s"
(if (and (eq flag 'nofollow) (tramp-get-remote-chmod-h v)) "-h" "")
mode (tramp-shell-quote-argument localname))
"Error while changing file's mode %s" filename))))