~ubuntu-branches/ubuntu/jaunty/ant/jaunty-proposed

« back to all changes in this revision

Viewing changes to docs/manual/CoreTasks/chmod.html

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Gybas
  • Date: 2002-02-14 14:28:48 UTC
  • Revision ID: james.westby@ubuntu.com-20020214142848-2ww7ynmqkj31vlmn
Tags: upstream-1.4.1
ImportĀ upstreamĀ versionĀ 1.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
 
 
3
<head>
 
4
<meta http-equiv="Content-Language" content="en-us">
 
5
<title>Ant User Manual</title>
 
6
</head>
 
7
 
 
8
<body>
 
9
 
 
10
<h2><a name="chmod">Chmod</a></h2>
 
11
<h3>Description</h3>
 
12
<p>Changes the permissions of a file or all files inside specified directories. Right now it has effect only under Unix.
 
13
The permissions are also UNIX style, like the argument for the chmod command.</p>
 
14
<p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based
 
15
tasks</a>, on how the inclusion/exclusion of files works, and how to
 
16
write patterns.</p>
 
17
<p>This task holds an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
 
18
supports all of FileSet's attributes and nested elements
 
19
directly. More FileSets can be specified using nested
 
20
<code>&lt;fileset&gt;</code> elements.</p>
 
21
<h3>Parameters</h3>
 
22
<table border="1" cellpadding="2" cellspacing="0">
 
23
  <tr>
 
24
    <td valign="top"><b>Attribute</b></td>
 
25
    <td valign="top"><b>Description</b></td>
 
26
    <td align="center" valign="top"><b>Required</b></td>
 
27
  </tr>
 
28
  <tr>
 
29
    <td valign="top">file</td>
 
30
    <td valign="top">the file or single directory of which the permissions 
 
31
      must be changed.</td>
 
32
    <td valign="top" valign="middle" rowspan="2">exactly one of the two or nested <code>&lt;fileset&gt;</code> elements.</td>
 
33
  </tr>
 
34
  <tr>
 
35
    <td valign="top">dir</td>
 
36
    <td valign="top">the directory which holds the files whose permissions 
 
37
      must be changed.</td>
 
38
  </tr>
 
39
  <tr>
 
40
    <td valign="top">perm</td>
 
41
    <td valign="top">the new permissions.</td>
 
42
    <td valign="top" align="center">Yes</td>
 
43
  </tr>
 
44
  <tr>
 
45
    <td valign="top">includes</td>
 
46
    <td valign="top">comma separated list of patterns of files that must be
 
47
      included.</td>
 
48
    <td valign="top" align="center">No</td>
 
49
  </tr>
 
50
  <tr>
 
51
    <td valign="top">includesfile</td>
 
52
    <td valign="top">the name of a file. Each line of this file is
 
53
      taken to be an include pattern</td>
 
54
    <td valign="top" align="center">No</td>
 
55
  </tr>
 
56
  <tr>
 
57
    <td valign="top">excludes</td>
 
58
    <td valign="top">comma separated list of patterns of files that must be
 
59
      excluded. No files (except default excludes) are excluded when omitted.</td>
 
60
    <td valign="top" align="center">No</td>
 
61
  </tr>
 
62
  <tr>
 
63
    <td valign="top">excludesfile</td>
 
64
    <td valign="top">the name of a file. Each line of this file is
 
65
      taken to be an exclude pattern</td>
 
66
    <td valign="top" align="center">No</td>
 
67
  </tr>
 
68
  <tr>
 
69
    <td valign="top">defaultexcludes</td>
 
70
    <td valign="top">indicates whether default excludes should be used or not
 
71
      (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
 
72
    <td valign="top" align="center">No</td>
 
73
  </tr>
 
74
  <tr>
 
75
    <td valign="top">parallel</td>
 
76
    <td valign="top">process all specified files using a single
 
77
      <code>chmod</code> command. Defaults to true.</td>
 
78
    <td valign="top" align="center">No</td>
 
79
  </tr>
 
80
  <tr>
 
81
    <td valign="top">type</td>
 
82
    <td valign="top">One of <i>file</i>, <i>dir</i> or
 
83
      <i>both</i>. If set to <i>file</i>, only the permissions of
 
84
      plain files are going to be changed. If set to <i>dir</i>, only
 
85
      the directories are considered.</td>
 
86
    <td align="center" valign="top">No, default is <i>file</i></td>
 
87
  </tr>
 
88
</table>
 
89
<h3>Examples</h3>
 
90
<blockquote>
 
91
  <p><code>&lt;chmod file=&quot;${dist}/start.sh&quot; perm=&quot;ugo+rx&quot;/&gt;</code></p>
 
92
</blockquote>
 
93
<p>makes the &quot;start.sh&quot; file readable and executable for anyone on a
 
94
UNIX system.</p>
 
95
<blockquote>
 
96
<pre>
 
97
    &lt;chmod dir=&quot;${dist}/bin&quot; perm=&quot;ugo+rx&quot; includes=&quot;**/*.sh&quot;/&gt;
 
98
</pre>
 
99
</blockquote>
 
100
<p>makes all &quot;.sh&quot; files below <code>${dist}/bin</code>
 
101
readable and executable for anyone on a UNIX system.</p>
 
102
<blockquote>
 
103
<pre>
 
104
&lt;chmod perm=&quot;g+w&quot;&gt;
 
105
  &lt;fileset dir=&quot;shared/sources1&quot;&gt;
 
106
    &lt;exclude name=&quot;**/trial/**&quot;/&gt;
 
107
  &lt;/fileset&gt;
 
108
  &lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
 
109
&lt;/chmod&gt;
 
110
</pre>
 
111
</blockquote>
 
112
<p>makes all files below <code>shared/sources1</code> (except those
 
113
below any directory named trial) writable for members of the same
 
114
group on a UNIX system. In addition all files belonging to a FileSet
 
115
with <code>id</code> <code>other.shared.sources</code> get the same
 
116
permissions.</p>
 
117
<hr><p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
 
118
Reserved.</p>
 
119
 
 
120
</body>
 
121
</html>
 
122