I believe I have resolved the problem – it was due to weird ACL settings on the server and not file permissions. Thanks for your help, and the fantastic plugin!
Some notes of what I tried before I found that out –
I changed the permissions of every file and directory in the installation simultaneously.
I created the database manually and tried 777 to no luck. I reproduced the error by changing entries in a working database to have the wrong URL in the settings table.
Thanks!