wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Using java to chmod files in Unix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Using java to chmod files in Unix" Watch "Using java to chmod files in Unix" New topic
Author

Using java to chmod files in Unix

Anupreet Arora
Ranch Hand

Joined: Jun 17, 2003
Posts: 81
Can we use java to reliable change permissions (chmod) or owner (chown) of files in a unix file system ?

Any ideas will be most appreciated

Thanks
Anupreet
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Sure. Use the Runtime.exec() family of methods to execute the chmod/chown programs.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using java to chmod files in Unix