Bug 41054 - chmod task: set permission on single folder - documentation/implementation difference
Summary: chmod task: set permission on single folder - documentation/implementation d...
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 1.6.5
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 1.8.0
Assignee: Ant Notifications List
URL:
Keywords:
: 47118 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-28 06:58 UTC by Dominique De Munck
Modified: 2009-05-14 05:50 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique De Munck 2006-11-28 06:58:49 UTC
Hi,

for the chmod task, the docs explain the following attributes:

file  	the file or single directory of which the permissions must be changed.
dir  	the directory which holds the files whose permissions must be changed.

However, this is not what I'm experiencing (Ant 1.6.2 & 1.6.5).
If I want to set the permissions on the dir "myFolder" only, using

<chmod file="myFolder/" perm="a+w"/>

It does nothing but give the following output:

 mychmod:
    [chmod] Skipping fileset for directory
/home/devel/web_software/tomcat/webapps/lenya/lenya/pubs/WFS/content/authoring/documents/PDUC1.
It is empty.

Yet, it does exactly what I need (set the permission of a single folder)when
calling it with the dir attribute :

<chmod dir="myFolder/" perm="a+w"/>

I guess the implementation of the "Ant version 1.1" is still executed ?
Because I noticed in the latest source code the following extract:

  /*
   * In Ant 1.1, <chmod dir="foo" /> means, change the permissions
   * of directory foo, not anything inside of it.  This is the case the
   * second branch of the if statement below catches for backwards
   * compatibility.
   */

Yet this "backwards compatibility" clause conflicts with the documentation ?
Or am I missing something ?

my build file:


<project name="MS_DCTM_Migration" basedir="." default="mychmod">
 <target name="mychmod">
<chmod file="myFolder" perm="a+w"/>
</target>
</project>
Comment 1 Stefan Bodewig 2008-08-21 06:58:29 UTC
documented in svn rev 687765
Comment 2 Stefan Bodewig 2009-05-14 05:50:52 UTC
*** Bug 47118 has been marked as a duplicate of this bug. ***