• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Why Ant copy change the ownership of files

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a question about using ant copy task.

In Linux environment, if some files' owner are somebody else, but say my userid is in the group owner of these files. If I copy files over these files, the owner of these files are not changed.

In ant, if I use copy task, these files' ownership will be change to my userid .

I am wondering why? Can somebody give me an explanation?
 
Saloon Keeper
Posts: 28663
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ant was written in Java and Java, by design doesn't support OS-specific stuff like file ownerships. Effectively, you get the same rights on the results of the copy that you would if you wrote a standalone Java app that created a new file and copied the contents of the source file into it.
reply
    Bookmark Topic Watch Topic
  • New Topic