title: JVM Security Manager File permissions - custom policy
body: <p>I've found a somehow unexpected behaviour using JVM Security Manager custom policies.</p>
  
  <p>repo: <a href="https://github.com/pedrorijo91/jvm-sec-manager" rel="nofollow noreferrer">https://github.com/pedrorijo91/jvm-sec-manager</a></p>
  
  <p>in branch master, go into the <code>/code</code> folder:</p>
  
  <ul>
  <li>custom policy file grants File read permission for file <code>../allow/allow.txt</code></li>
  <li>no permission for the file <code>../deny/deny.txt</code> </li>
  <li>the code in the HelloWorld.java tries to read both files</li>
  <li>There's a <code>run.sh</code> script to run the command</li>
  </ul>
  
  <p>Now everything works as expected: the allowed file reads, but the other throws a security exception: <code>java.security.AccessControlException: access denied ("java.io.FilePermission" "../deny/deny.txt" "read")</code> </p>
  
  <p>But if I move both files (<code>../allow/allow.txt</code> and <code>../deny/deny.txt</code>) to the <code>code</code> folder (changing the custom policy and the java code to use those files), I get no exception. (branch 'unexpected')</p>
  
  <p>Is the current directory a special case or something else is happening?</p>