ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Stockall <>
Subject RE: [SUBMIT] Attrib task (chmod for Windows)
Date Fri, 25 Jan 2002 22:58:14 GMT
On Fri, 2002-01-25 at 17:07, Rob Oxspring wrote:

> I agree - part of the problem is the semantics of the "perm" string this is
> specific to each command and IMHO would be far clearer to read as separate
> attributes readable, writable, executable in the case of chmod and
> readonly,hidden,system,archive for attrib - thus there would be no confusion
> of what the R means in each perm string.


> Determined to get some feedback (just tell me it sucks if you like) I'll
> restate my proposed combined task:
> <filerights>
>   <fileset ... > ... </fileset>
>   <fat readonly="no" hidden="no"/>
>   <ntfs>
>    <grant user="RobertO"  access="full"/>
>    <grant user="Informatics"  access="read"/>
>    <grant user="everyone" access="read"/>
>   </ntfs>
>   <unix>
>     <user name="roberto"     readable="yes" writable="yes" executable="yes">
>     <group name="informatics" readable="yes" writable="no" executable="yes">
>     <all readable="yes" writable="no" executable="no">
>   </unix>
>   <fat readonly="yes" hidden="yes"/>
> </filerights>

I would rather have something like:

<permission readable="true" writable="false" system="true">
    <fileset ...>
    <unix who="uo"/>

Which would do

attrib +R +S <fileset>

chmod uo+r <fileset>
chmod uo-w <fileset>

> The full list of commands should be attempted on every platform and warning
> messages should be issued as commands fail (maybe calls to a given util
> should not be attempted once they have failed once).  I think the big
> selling point of a combined task is that people using it to set the unix
> permissions (for example) will be confronted by a bunch of ntfs permissions
> in the manual which should trigger the build engineer to think about NT
> permissions required and vice versa.  

Why would a Unix shop want to be "think" about NT permissions (or vise
versa)? The task should be smart enough not to attempt to set executable
on a Windows file. Unless -debug is enabled I don't want to see warnings
about things I know already (no system flag on Unix)

> I think this approach would cover all bases, and gives the engineer enough
> control to specify the order in which the attribute setting gets attempted
> so that the desired affect is achieved.
> Rob

IMO a permission task (attrib + chmod) should only support the level of
functionality that can be assured across target platforms. 

This means that chown/chgrp on Unix, NTFS acl's, chmod on Windows
(cygwin or path of NFS package) would be handled by other tasks, or by
exec. Most of these operations are dependent on things that may or not
be present (chmod.exe on Windows) or hard to verify (NTFS on Windows).

 Jesse Stockall			|	Tel: 1+ 613.599.2441 ext. 243
 CRYPTOCard Corporation		|	Fax: 1+ 613.599.2442	 	
 Suite 304, 300 March Rd.	|	email:
 Ottawa, ON, Canada K2K 2E2	|	web: 

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message