How to Get Rid of Drupal When it Doesn’t Want to Go

When working with Drupal, especially on shared hosting, there’s a problem I’ve run across more than once where I can’t simply rm -rf {foldername} to get rid of the project. I can’t remember the exact output, but it’s something to the effect that I lack permission to delete various files in {drupalroot}/sites/default – including settings.php. This is frustrating, because any search through those files confirms that, in fact, I do have permisson to do whatever to them because my useraccount is listed as the owner!

I’m not really sure how or why this ends up happening, but the solution, as it turns out, is to run chmod 777 on {drupalroot}/sites/default. Right – cd into sites and run chmod 777 default. (Note that it doesn’t even need to be recursive!)

After that, for reasons which remain mysterious to me, you can cd above the drupal root and rm -rf the whole project.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>