ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Oxspring" <>
Subject RE: PROPOSAL: chgrp, chown, chmod, chrights + question ;)
Date Fri, 09 Nov 2001 20:42:38 GMT
I've been thinking about putting together a bigger change for a while (since
the chrights task first came up), and wondered what others thought...

My pet hate with the the chmod task is that it is too like the unix
commandline tool and not a verbose style interface in keeping with ant
tasks - basically I think that the perm attribute should be replaced by a
bunch of inner elements in any "new" implementation.  My other niggle with
the chmod task is that it doesn't seem to work on windows - I use
Hummingbird NFS (or something like that) to mount unix shares as drives in
NT and have a chmod.exe all ready to us, but Ant doesn't seem to take
advantage of this.

Another niggle is that there is no equivelant attrib task for FAT / NTFS
drives and no support for CACLS.EXE which seems to be part of NT4 & W2K for
changing access control lists on NTFS.  The XML snippet following demos my
proposal, where a given set of files can be altered in different ways on
different filing systems:

	<fileset ... > ... </fileset>
	<fat readonly="yes|no" hidden="yes|no" system="yes|no" archive="yes|no"/>
		<grant user="roberto"  access="none|read|write|change|full"/>
		<grant user="everyone" access="none|read|write|change|full"/>
		<user  name="roberto"     readable="yes|no" writable="yes|no"
		<group name="informatics" readable="yes|no" writable="yes|no"
		<all                      readable="yes|no" writable="yes|no"

The fat,ntfs and unix elements would correspond to calls to attrib,cacls and
chmod+chown accordingly.  The order of execution would match the order in
the buildfile, leaving it to the build engineer to resolve clashes between

So why haven't I done it already? mainly because I keep getting scared off
by the code to exec other files :-) Also I'm not sure when the task should
be considered to fail - presumably it should fail if none of the three
subtask types succeeds but is this good enough?

Of course all of this is only really worth it if people would find the
functionality useful so what do people think? should I pull my finger out
and get on with it, or should I go back to the drawing board?



> -----Original Message-----
> From: Martin van den Bemt []
> Sent: Thursday, November 08, 2001 3:39 PM
> To: Ant Developers List
> Subject: RE: PROPOSAL: chgrp, chown, chmod, chrights + question ;)
> Soo below..
> > -----Original Message-----
> > From: Stefan Bodewig []
> > Sent: Thursday, November 08, 2001 3:41 PM
> > To:
> > Subject: Re: PROPOSAL: chgrp, chown, chmod, chrights + question ;)
> >
> >
> > On Tue, 6 Nov 2001, Martin van den Bemt <> wrote:
> >
> > > but since backward compatibility is necessary, I could create the
> > > chgrp and chown tasks (simple copies of chmod) and integrate the 3
> > > in the chrights task.
> >
> > As there is no single chgrp task, there is no need for having a
> > separate task IMHO.  Do you exepect chrights to use a similar sytax
> > like chmod did?
> I planned a lot of copy and past in there yes ;))
> > If so, we could get away with making chmod an alias
> > name for chrights (and issue a deprecation warning if somebody uses
> > that name).
> I'm in favour of that too..
> > > d) Let's deprecate the chown and go for the chrights
> >
> > Yes.
> > > 2) If everyone prefers a or c, I would prefer to minimize code and
> > > execute the task chmod/chown/chgrp from the chrights task.
> >
> > Don't know whether this actually is necessary, see above.
> >
> > > but couldn't find a clean way to do that from my code.
> >
> > There are a couple of tasks that do similar things, see how <genkey>
> > (ab)uses <exec> for example.
> I'll see what these tasks do..
> Thanx for the reply..
> Mvgr,
> Martin
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

Do You Yahoo!?
Get your free address at

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

View raw message