119 lines
2.9 KiB
HTML
119 lines
2.9 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||
|
<meta http-equiv="Content-Type" content=
|
||
|
"text/html; charset=utf-8">
|
||
|
<title>umask - Get or set the file mode creation mask</title>
|
||
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</HEAD>
|
||
|
<body bgcolor="#FFFFFF">
|
||
|
<!-- Java sync-link -->
|
||
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
||
|
|
||
|
|
||
|
|
||
|
<h2>umask - Get or set the file mode creation mask</h2>
|
||
|
|
||
|
<strong>Synopsis</strong>
|
||
|
|
||
|
<p><strong>umask</strong> [ <strong>-S</strong> ] [ <em>mask</em>
|
||
|
]</p>
|
||
|
|
||
|
<p><strong>Description</strong></p>
|
||
|
|
||
|
<p>You can use <strong>umask</strong> to set or display the file
|
||
|
creation mask. The mask allows you to control the file permission
|
||
|
bits that are set when creating a file or directory.</p>
|
||
|
|
||
|
<p>If you specify <em>mask</em>, <strong>qsh</strong> sets the file
|
||
|
creation mask to <em>mask</em>. If you do not specify <em>
|
||
|
mask</em>, <strong>qsh</strong> displays the current file creation
|
||
|
mask on standard output.</p>
|
||
|
|
||
|
<p><strong>Options</strong></p>
|
||
|
|
||
|
<ul>
|
||
|
<li><strong>-S</strong> Use symbolic permissions.</li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>Operands</strong></p>
|
||
|
|
||
|
<p>When using symbolic permissions, <em>mask</em> is an expression
|
||
|
that defines which permissions should not be removed. A symbolic
|
||
|
permission is an expression with the format [ <em>who</em> ] <em>
|
||
|
op</em> [ <em>permission</em> ] where:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li><em>who</em> is a combination of the letters:
|
||
|
|
||
|
<ul>
|
||
|
<li><strong>u</strong> for owner permissions.</li>
|
||
|
|
||
|
<li><strong>g</strong> for group permissions</li>
|
||
|
|
||
|
<li><strong>o</strong> for other (or public) permissions</li>
|
||
|
|
||
|
<li><strong>a</strong> for all permissions (the default
|
||
|
value).</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
|
||
|
<li><em>op</em> is one of the following:
|
||
|
|
||
|
<ul>
|
||
|
<li><strong>-</strong> (minus) to delete the permission.</li>
|
||
|
|
||
|
<li><strong>+</strong> (plus) to add the permission.</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
|
||
|
<li><em>permission</em> is one or more of the following:
|
||
|
|
||
|
<ul>
|
||
|
<li><strong>r</strong> for read permission.</li>
|
||
|
|
||
|
<li><strong>w</strong> for write permission.</li>
|
||
|
|
||
|
<li><strong>x</strong> for execute or search permission.</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>Exit Status</strong></p>
|
||
|
|
||
|
<ul>
|
||
|
<li>0 when successful.</li>
|
||
|
|
||
|
<li>>0 when <em>mask</em> is invalid.</li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>Related information</strong></p>
|
||
|
|
||
|
<ul>
|
||
|
<li><a href="chmod.htm">chmod - Change file modes
|
||
|
(permissions)</a></li>
|
||
|
|
||
|
<li><a href="touch.htm">touch - Change file access and modification
|
||
|
times</a></li>
|
||
|
</ul>
|
||
|
|
||
|
<strong>Examples</strong>
|
||
|
|
||
|
<ol>
|
||
|
<li>Display the current file creation mask in symbolic form:
|
||
|
<strong>umask -S</strong></li>
|
||
|
|
||
|
<li>Display the current file creation mask: <strong>
|
||
|
umask</strong></li>
|
||
|
|
||
|
<li>Set the file creation mask to remove read permission for
|
||
|
others: <strong>umask</strong> 004</li>
|
||
|
|
||
|
<li>Set the file creation mask to remove write permission for
|
||
|
group: <strong>umask -S</strong> g-w</li>
|
||
|
</ol>
|
||
|
</body>
|
||
|
</html>
|
||
|
|