This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes file permissions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "file permissions" Watch "file permissions" New topic

file permissions

nabou diack

Joined: Oct 17, 2001
Posts: 13
I'm having troubles with file permissions in my java.policy
i'm trying to write in a a file named fac.html located in my server.
my server's name is omni and the file is in the directory bills . I tried the following but none of it works. can you help? thanks a lot
java .policy
i tried this
grant codeBase "file://omni:/bills/*" {
permission "<<ALL FILES>>", "write";
i also tried this:
{permission "//Omni//bills//fac.html", "read,write,execute";
nabou diack

Joined: Oct 17, 2001
Posts: 13
here is the error message i'm getting access denied ( Omni
net1\iManager\factures\facturefrancaise.html write)
at java.lang.SecurityManager.checkPermission(
at java.lang.SecurityManager.checkWrite(
at accountServer.getFactureGeneree(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
at java.lang.reflect.Method.invoke(
at sun.rmi.server.UnicastServerRef.dispatch(
at sun.rmi.transport.Transport$
at Method)
at sun.rmi.transport.Transport.serviceCall(
at sun.rmi.transport.tcp.TCPTransport.handleMessages(
at sun.rmi.transport.tcp.TCPTransport$
I agree. Here's the link:
subject: file permissions
Similar Threads
access denied
struts file upload problem
Java2 Security Permissions
Rmi BAsic Problem
Using Policy File