Hi, I have a question about setting file permissions on a Unix system.
I am using the File.createNewFile() methode to create a new file in a Directory. The directory is created using File.mkdirs().
The file/directory must be created using the permissions of the user. But for some reason it does not happen. How can I change the permission of a file to: "rwx" for the user, "r" for the group and "r" for the world/others.
As mentioned: for some reason the permissons defined for the user won't work.
Which java class/methods to call and what are the parameters?
Kind regards and thanks in advange,
Madere.
I am using the File.createNewFile() methode to create a new file in a Directory. The directory is created using File.mkdirs().
The file/directory must be created using the permissions of the user. But for some reason it does not happen. How can I change the permission of a file to: "rwx" for the user, "r" for the group and "r" for the world/others.
As mentioned: for some reason the permissons defined for the user won't work.
Which java class/methods to call and what are the parameters?
Kind regards and thanks in advange,
Madere.