• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

file permissions

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
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 java.io.FilePermission "<<ALL FILES>>", "write";
};
i also tried this:
grant
{permission java.io.FilePermission "//Omni//bills//fac.html", "read,write,execute";
}
 
nabou diack
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here is the error message i'm getting
java.security.AccessControlException: access denied (java.io.FilePermission Omni
net1\iManager\factures\facturefrancaise.html write)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:273)
at java.security.AccessController.checkPermission(AccessController.java:
404)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkWrite(SecurityManager.java:978)
at java.io.File.createNewFile(File.java:827)
at accountServer.getFactureGeneree(accountserver.java:2232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:42)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:28)
at java.lang.reflect.Method.invoke(Method.java:327)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:264)
at sun.rmi.transport.Transport$1.run(Transport.java:151)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:147)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
63)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:704)
at java.lang.Thread.run(Thread.java:539)
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic