How to set permission of a file created by java?
I have searched online, but could not find any clear solutions.
Basically my java program writes files to a linux directory. The directory itself has 755; but the files created only has 700. What can I do so that the files will also have 755? I am looking for a solution that is either done once from Linux or programmatic solution from Java, but I would like to avoid having to use Runtime.exec to call chmod because it would be a hack. Thanks.
|