aspose file tools
The moose likes Beginning Java and the fly likes Using java to chmod files in Unix Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 24081
    
  15

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
 
Similar Threads
Problem starting Tomcat 4.1.31 on Mac OS X
.bin files????
File.canWrite()?
Changing File Permission
How to get File.canRead() to return false?