To DPA:
With the 3GS, you CAN'T just downgrade. Like with the iPod Touch 3rd generation, Apple's servers have to "sign off" (cryptographically) on whatever firmware you are using to conduct the restore. Apple has stopped signing any firmware versions older than 3.1.2 for the iPhone 3GS and iPod Touch 3rd-gen. The OP sounds like he is trying to get around this issue by editing his local 'hosts' file to repoint iTunes to a different signature server somewhere else.
To the OP:
If you want to edit the 'hosts' file inside of /private/etc, you can't just type the name of that file at the shell. If you do, the system thinks you're trying to execute that file, and not only is the file not 'executable' (there's no executable computer code contained in there...it's just a text file), but because it's not executable, the executable permissions bits have not been set on the file. That's why you are getting "permission denied."
You need to edit the file using a text editor of some kind. You also need to do this as a superuser/root otherwise the system won't allow you to make changes to the file. Try this:
1. Make sure you are logged in to the system as an account that is set to be an Administrator.
2. At the shell, type 'sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /private/etc/hosts'
3. The 'sudo' part asks the system to run the application (in this case, TextEdit) as root/superuser. When you do this, you will be promped for a password. It's asking you for your account password. Enter it.
4. After you type the correct password, TextEdit will start up and open the hosts file. You can make your changes in here, and save.
Of course, in order for the downgrade to be successful, you either have to have 3.0(.1) signatures from Apple stored on Saurik's Apple Signature Replay server, or you need to have managed to capture a copy of the signatures yourself from back when Apple was still signing 3.0(.1), and then use the TinyTSS server locally. For more information on this, please see the ModMyi 3GS downgrade forums.
-- Nathan