Cant apt-get remove or apt-get install | fopen permission denied
linux, raspberry-pi, ssh
Solution
The fopen permission denied thing when doing apt-get or dpkg, is very often a sign that your manpages cache at `/var/cache/man` is owned by `root:root` instead of `man:root`. Try changing this with
chown -R man:root /var/cache/man
Problem
So out of no where I was unable to SSH into my headless linux box. So I hooked up a screen and started tooling with it. My server is still fully functional and the box seems in tact. I just wouldn't let me SSH in. So I tried follow a few online tutorials on adding my IP to the SSH allow file but nothing seemed to work. I kept getting "Network Connect: Connection Refused" when attempting to SSH in with putty. So I decided to nuke the iptables and do ``` sudo apt-get remove --purge iptables ``` which resulted in a failure. Something like this "processing tables for mandb " "fopen permission denied" So I tried doing sudo apt-get install iptables which it said the same fopen error. 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.