aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/umask.txt
diff options
context:
space:
mode:
authorGravatar David Adam (zanchey) <zanchey@ucc.gu.uwa.edu.au>2013-05-12 15:56:01 +0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-05-13 01:48:20 -0700
commit1287b9d82382bf22e16edda67eae755f07397f2e (patch)
tree811814b029d65ac11a193e616ca4a71d216dbe0c /doc_src/umask.txt
parent91aab03b90a6b583a3c0ecff5b015c6066d34f28 (diff)
Help cleanup
Large list of changes, including formatting and typos for most commands. More substantive changes have been made to alias, bind, block, break, builtin, case, cd, commandline, count, else, emit, fish_config, funced, function, functions, history, math, mimedb, nextd, not, popd, prevd, pushd, pwd, random, read, set, set_color, switch, test, trap, type, ulimit, umask, and while.
Diffstat (limited to 'doc_src/umask.txt')
-rw-r--r--doc_src/umask.txt35
1 files changed, 22 insertions, 13 deletions
diff --git a/doc_src/umask.txt b/doc_src/umask.txt
index 0a75e3db..bc9aac0c 100644
--- a/doc_src/umask.txt
+++ b/doc_src/umask.txt
@@ -1,17 +1,31 @@
-\section umask umask - set or get the file-creation mask
+\section umask umask - set or get the file creation mode mask
\subsection umask-synopsis Synopsis
<code>umask [OPTIONS] [MASK]</code>
\subsection umask-description Description
-With no argument, the current file-creation mask is printed, if an
-argument is specified, it is the new file creation mask. The mask may
-be specified as an octal number, in which case it is interpreted as
-the rights that should be masked away, i.e. it is the inverse of the
-file permissions any new files will have.
+\c umask displays and manipulates the "umask", or file creation mode mask,
+which is used to restrict the default access to files.
-If a symbolic mask is specified, the actual file permission bits, and
+The umask may be expressed either as an octal number, which represents
+the rights that will be removed by default, or symbolically, which represents
+the only rights that will be granted by default.
+
+Access rights are explained in the manual page for the \c chmod(1) program.
+
+With no parameters, the current file creation mode mask is printed as
+an octal number.
+
+- <code>-h</code> or <code>--help</code> prints this message.
+- <code>-S</code> or <code>--symbolic</code> prints the umask in symbolic form instead of octal form.
+- <code>-p</code> or <code>--as-command</code> outputs the umask in a form that may be reused as input
+
+If a numeric mask is specified as a parameter, the current shell's umask
+will be set to that value, and the rights specified by that mask will be
+removed from new files and directories by default.
+
+If a symbolic mask is specified, the desired permission bits, and
not the inverse, should be specified. A symbolic mask is a comma
separated list of rights. Each right consists of three parts:
@@ -34,12 +48,7 @@ and \c =, respectively. As an example, <code>r,u+w</code> means all
users should have read access and the file owner should also have
write access.
-- <code>-h</code> or <code>--help</code> print this message
-- <code>-S</code> or <code>--symbolic</code> prints the file-creation mask in symbolic form instead of octal form. Use <code>man chmod</code> for more information.
-- <code>-p</code> or <code>--as-command</code> prints any output in a form that may be reused as input
-
-The umask implementation in fish should behave identically to the one
-in bash.
+Note that symbolic masks currently do not work as intended.
\subsection umask-example Example