title: Cant apt-get remove or apt-get install | fopen permission denied
body: <p>So out of no where I was unable to SSH into my headless linux box.</p>
  
  <p>So I hooked up a screen and started tooling with it.</p>
  
  <p>My server is still fully functional and the box seems in tact. I just wouldn't let me SSH in.</p>
  
  <p>So I tried follow a few online tutorials on adding my IP to the SSH allow file but nothing seemed to work.</p>
  
  <p>I kept getting </p>
  
  <blockquote>
    <p>"Network Connect: Connection Refused"</p>
  </blockquote>
  
  <p>when attempting to SSH in with putty.</p>
  
  <p>So I decided to nuke the iptables and do </p>
  
  <pre><code>sudo apt-get remove --purge iptables
  </code></pre>
  
  <p>which resulted in a failure.</p>
  
  <p>Something like this</p>
  
  <blockquote>
    <p>"processing tables for mandb " "fopen permission denied"</p>
  </blockquote>
  
  <p>So I tried doing</p>
  
  <p>sudo apt-get install iptables</p>
  
  <p>which it said the same fopen error.</p>
  
  <p>End result is my server is up and running but I have no ssh capabilities into my box. On that note though I do still have an active samba connection. Take that for what its worth. </p>