summary refs log tree commit diff
path: root/Doc/Zsh
diff options
context:
space:
mode:
authorMatthew Martin <phy1729@gmail.com>2019-03-18 22:14:37 -0500
committerMatthew Martin <phy1729@gmail.com>2019-03-18 22:17:54 -0500
commit6331772c5b35ff9d4deb80ff9461d04b5e0d2db5 (patch)
treee90f36d9800ee50ee6ce80a6e5aa2fa3e5b9f482 /Doc/Zsh
parent2f670be951b1b6e242691562a9daf06010bfce99 (diff)
downloadzsh-6331772c5b35ff9d4deb80ff9461d04b5e0d2db5.tar.gz
zsh-6331772c5b35ff9d4deb80ff9461d04b5e0d2db5.tar.xz
zsh-6331772c5b35ff9d4deb80ff9461d04b5e0d2db5.zip
44135: Add chmod builtin
Diffstat (limited to 'Doc/Zsh')
-rw-r--r--Doc/Zsh/mod_files.yo20
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/Zsh/mod_files.yo b/Doc/Zsh/mod_files.yo
index 90e988474..3cf7b61e3 100644
--- a/Doc/Zsh/mod_files.yo
+++ b/Doc/Zsh/mod_files.yo
@@ -23,6 +23,26 @@ item(tt(chgrp) [ tt(-hRs) ] var(group) var(filename) ...)(
 Changes group of files specified.  This is equivalent to tt(chown) with
 a var(user-spec) argument of `tt(:)var(group)'.
 )
+findex(chmod)
+item(tt(chmod) [ tt(-Rs) ] var(mode) var(filename) ...)(
+Changes mode of files specified.
+
+The specified var(mode) must be in octal.
+
+The tt(-R) option causes tt(chmod) to recursively descend into directories,
+changing the mode of all files in the directory after
+changing the mode of the directory itself.
+
+The tt(-s) option is a zsh extension to tt(chmod) functionality.  It enables
+paranoid behaviour, intended to avoid security problems involving
+a tt(chmod) being tricked into affecting files other than the ones
+intended.  It will refuse to follow symbolic links, so that (for example)
+``tt(chmod 600 /tmp/foo/passwd)'' can't accidentally chmod tt(/etc/passwd)
+if tt(/tmp/foo) happens to be a link to tt(/etc).  It will also check
+where it is after leaving directories, so that a recursive chmod of
+a deep directory tree can't end up recursively chmoding tt(/usr) as
+a result of directories being moved up the tree.
+)
 findex(chown)
 item(tt(chown) [ tt(-hRs) ] var(user-spec) var(filename) ...)(
 Changes ownership and group of files specified.