I am trying to track a problem we are having with some java code on redhat linux.

The code below is failing.

if(metadDir.isDirectory() && metaDir.canWrite()) {....

the canWrite function is where the failure happens. The reason that it happens is the directory is on a filer that is controlled by automount. If the directory is not mounted the node permissions are returned not the directory permissions making the canWrite function fail. If you access the directory beforehand and you are sure it is mounted everything works correctly. The other problem I have is that it works correctly on solaris even though I don't think it should. Is there a good way to address this? Has anyone else run into this. Any help would be appreciated.

Thanks,
Jug