This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Changing user using ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Changing user using ant" Watch "Changing user using ant" New topic
Author

Changing user using ant

Vinayak patil
Ranch Hand

Joined: Aug 30, 2005
Posts: 67
Hi,

Is there a way to change the user using ant?

I need it to change some permissions on a file. This is a deployable war file so I need to change the permissions every time it is deployed.

I was thinking of incorporating the command in the ant file itself

Thanks in advance,

Vinayak


"I can resist everything except temptation"
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17033
    
  26

The concept of "user" is very OS-dependent, so the answer depends on what OS you're using.


An IDE is no substitute for an Intelligent Developer.
Vinayak patil
Ranch Hand

Joined: Aug 30, 2005
Posts: 67
Hi,

I am deploying the application on LINUX

-Vinayak
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17033
    
  26

A lot depends on what you're doing to deploy the WAR, but assuming that you're deploying it to the same machine Ant runs of and just copying it, you can use the ant "exec" task to execute the "chown" Linux command.
 
Have you checked out Aspose?
 
subject: Changing user using ant
 
It's not a secret anymore!