You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

chown.html 3.0 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Chown Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="Chown">Chown</a></h2>
  8. <h3>Description</h3>
  9. <p>Changes the owner of a file or all files inside specified
  10. directories. Right now it has effect only under Unix. The owner
  11. atribute is equivalent to the coresponding argument for the chown
  12. command.</p>
  13. <p><a href="../CoreTypes/fileset.html">FileSet</a> can be specified
  14. using nested <code>&lt;fileset&gt;</code> elements.</p>
  15. <h3>Parameters</h3>
  16. <table border="1" cellpadding="2" cellspacing="0">
  17. <tr>
  18. <td valign="top"><b>Attribute</b></td>
  19. <td valign="top"><b>Description</b></td>
  20. <td align="center" valign="top"><b>Required</b></td>
  21. </tr>
  22. <tr>
  23. <td valign="top">file</td>
  24. <td valign="top">the file of which the owner must be changed.</td>
  25. <td valign="top" valign="middle" rowspan="2">one of the two or
  26. nested <code>&lt;fileset&gt;</code> elements.</td>
  27. </tr>
  28. <tr>
  29. <td valign="top">dir</td>
  30. <td valign="top">the directory of which the owner must be changed.</td>
  31. </tr>
  32. <tr>
  33. <td valign="top">owner</td>
  34. <td valign="top">the new owner.</td>
  35. <td valign="top" align="center">Yes</td>
  36. </tr>
  37. <tr>
  38. <td valign="top">parallel</td>
  39. <td valign="top">process all specified files using a single
  40. <code>chown</code> command. Defaults to true.</td>
  41. <td valign="top" align="center">No</td>
  42. </tr>
  43. <tr>
  44. <td valign="top">type</td>
  45. <td valign="top">One of <i>file</i>, <i>dir</i> or
  46. <i>both</i>. If set to <i>file</i>, only the owner of
  47. plain files are going to be changed. If set to <i>dir</i>, only
  48. the directories are considered.</td>
  49. <td align="center" valign="top">No, default is <i>file</i></td>
  50. </tr>
  51. </table>
  52. <h3>Examples</h3>
  53. <blockquote>
  54. <p><code>&lt;chown file=&quot;${dist}/start.sh&quot; owner=&quot;coderjoe&quot;/&gt;</code></p>
  55. </blockquote>
  56. <p>makes the &quot;start.sh&quot; file belong to coderjoe on a
  57. UNIX system.</p>
  58. <blockquote>
  59. <pre>
  60. &lt;chown owner=&quot;coderjoe&quot;&gt;
  61. &lt;fileset dir=&quot;${dist}/bin&quot; includes=&quot;**/*.sh&quot;/&gt;
  62. &lt;/chown&gt;
  63. </pre>
  64. </blockquote>
  65. <p>makes all &quot;.sh&quot; files below <code>${dist}/bin</code>
  66. belong to coderjoe on a UNIX system.</p>
  67. <blockquote>
  68. <pre>
  69. &lt;chown owner=&quot;coderjoe&quot;&gt;
  70. &lt;fileset dir=&quot;shared/sources1&quot;&gt;
  71. &lt;exclude name=&quot;**/trial/**&quot;/&gt;
  72. &lt;/fileset&gt;
  73. &lt;fileset refid=&quot;other.shared.sources&quot;/&gt;
  74. &lt;/chown&gt;
  75. </pre>
  76. </blockquote>
  77. <p>makes all files below <code>shared/sources1</code> (except those
  78. below any directory named trial) belong to coderjoe on a UNIX
  79. system. In addition all files belonging to a FileSet
  80. with <code>id</code> <code>other.shared.sources</code> get the same
  81. owner.</p>
  82. <hr>
  83. <p align="center">Copyright &copy; 2002 Apache Software
  84. Foundation. All rights Reserved.</p>
  85. </body>
  86. </html>