• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems with Ant "copy".

 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doing something like this:

the file is copied but the permissions change from r-xr-xr-x to rw-rw-rw- And since this is a shell script I am not able to run it! Thanks.
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at your umask value?
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's 022, so what does that tell me?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the Ant docs. There's an explicit disclaimer on copies because Java doesn't handle OS-specific features such as Unix file attributes or Windows ACLs. They also make suggestions on what to do when this limitation isn't acceptable.
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still not exactly sure why it happens, but ant has a "chmod" task which lets me change the file permissions. So that is the working solution at the moment.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic