Re: Security not recognising codebase...

Michael Weller <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <000701c2ed18$0d26a670$3707b9d9@gutschimachine>
> Mr. Weller,
>

Mr Seaver,

> please do your best from assuming im a total moron, because i can assure
> that not only is google something I use alot, but i have ATTEMPTED to
follow
> all the syntax mentioned in all the java.com documentation which is WHY i
> have turned to this mailing list.
>
> So please ASSUME that i actually NEED help, not a bunch of half-assed
google
> links!!
>
> for crying out loud...
>

I didn't mean to hurt you, I just wanted to help!

But it's still a google question... Policy files are quite common and very
well documented, you can all find it there.
Here's some example code that demonstrates the usage of FilePermission
http://javaalmanac.com/egs/java.security/File.html (guess what: found with
google!) for specific dirs.
If that doesn't help, you could try to let policytool build the policy file
for you...

HTH!

> to rephrase my question:
>
> I have fully attempted to restrict my JSP page's ability to read and write
> files. my catalina.policy section currently looks like this:
>
> grant {
>         permission java.io.FilePermission "<<ALL FILES>>", "read";
>         permission java.io.FilePermission "<<ALL FILES>>", "write";
>         permission java.io.FilePermission "<<ALL FILES>>", "execute";
> };
>
> this is obviously dangerous, and I have done everything in the "<<ALL
> FILES>>" section to get catalina to restrict the file privileges to a
couple
> of specific directories, such as:
>
> "/home/seaver/-"
>
> starting up catalina with the security manager produces no problem, but
the
> files im trying to write, refuse to be written, as if they can't be
written
> anywhere.
>
> With the "<<ALL FILES" token, it DOES work, so I must be missing something
> here?
>
> anybody who thinks i might need a little more than a generic google
search,
> pls help me out...
>
> S
> >

___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.