Java New File Method can't write to an NFS v4 file system on LINUX while executed from an AIX client
Issue
An application hosted on an AIX 6.1 server uses the "new file" method to create files on an nfs mount point mounted from LINUX 5.5 as NFS v4. Java exception is thrown while executing the code as unprivileged user. In fact, on the AIX system (client), the newly created file is seen with permission 000.
---------- 1 1046 4317 0 Jul 16 2010 file.txt
The file is truely created if the code is executed with root user privileges.
Below code will reproduce this bug.
File file = new File(path);
file.createNewFile();
if ((delete != null) && (delete.equals("yes"))) {
file.delete();
Environment
-
Red Hat Enterprise Linux 5.4 or below as NFSv4 server.
-
AIX machine as NFS client.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.