Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FileOutputStream+linux+ java.io.FileNotFoundException and Permission denied

807607Nov 20 2006 — edited Nov 20 2006
String filePath="/root/anjali";
try {
FileOutputStream fos = new FileOutputStream(new File(filePath));
fos.write(data);
System.out.println("\ndata written by Remoteservice");
fos.flush();
} catch (Exception e)
{
System.out.println(e);
}


I get following error:


java.io.FileNotFoundException: /root/anjali (Permission denied)



Plz help me ..i am working above program on red hat linux 9.0
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 18 2006
Added on Nov 20 2006
1 comment
1,555 views