Drupal filesystem permissions
Here are the basic permissions of an Drupal 6.x installation, after you have let Drupal write to your settings file. During the installation you have to have the permissions set to 755 to let Drupal write to the settings.php file. An easy way to check if your site is secure is to go to the status page (admin/reports/status).
/default on 755
/default/files including all subfolders and files on 777
/default/themes including all subfolders and files on 755
/default/modules including all subfolders and files on 755
/default/settings.php and /default/default.settings.php on 444