5 Replies Latest reply on Jan 11, 2010 7:04 PM by DrClap

    How to change the owner of a file

    807580
      Hello Guys,
      I can not find an answer for this anywhere on the net. I am trying to change the user of a file. this is the scenario. joe owns a file. i want java code that will be run under the user martin to change the ownership of the file owned by joe to martin. Is there any method in java that will change it for me?

      the only way i can do it now is make a file under the user martin. Then copy the contents of the file that is owned by joe in the new file owned by martin. This is ok but it takes up alot of CPU time that i think is a waste when all i need is to change ownership.

      The users are the same but just different names.

      thanks for any helps