I installed Drupal 6.2 on a sub domain in my hosting account. Now I am trying to delete the Drupal folder on my hosting directory but I am unable to do so. I am getting access denied error to settings.php file located in drupal>>sites>>default
I tried setting the permission read and write for this file, then directory and everything, but nothing worked. Also tried renaming the file, but it didn't help either. What is the reason and how can I delete this file?
I guess you should change owner/owner group of the file. I think file was written under root or www-data or similar user (apache user), and you're trying to delete it from different user? . chown command will help.
sudo chown your_username:your_username
However, if you can run sudo, and I guess you can, because of changing files perms, just run
sudo rm path/to/file