So I just had to migrate to a new server and everything went fine. I used SCP as the root user to pull everything over.
However, now there are all kinds of problems related to permissions and ownership of files. Most notably, none of my inside pages will load (everything is 404), however the front page loads fine. I suspect this is related to a missing htaccess file in the root directory...
I know how to FTP in and try to change permissions, I can also execute SSH commands. But I have NO IDEA who's supposed to be the owner of everything and what the directory permissions are supposed to be. I have even tried Chmodding the entire site 777 and it still doesn't solve the problem.
Can someone give me a simple step by step of how I figure out who owns what, how to set that up correctly and what the permissions should be for every file? I have been through the codex and tried every combination I could find but still no luck.