Drupal: Can’t delete Sites folder (Solved)

Hey there everyone. So I have ran across this problem multiple times. The problem is whenever I install Drupal everything is alright, but when it is time to delete all of my drupal files everything deletes correctly besides the sites folder. Many of you are probably wondering why you cannot delete the sites folder(Drupal)? Well in today’s quick tip I will explain how you can delete the Drupal sites folder and hopefully helps you avoid this problem in the future.

How you can delete the Drupal sites folder

I know there are many solutions to this problem but they require a bit of knowledge about severs and not many people work, or are familiar with server side developments. I have found a pretty simple method for deleting this folder and hope you all understand it. So to delete your sites folder simply navigate to your sites folder>>Right click>> properties>> and you will see the file permission is set to 555. Change file permission to 777 and you should now be able to delete your Drupal sites folder.

The problem

The problem was the Drupal sites folder was set to permissions 555 which is not rewritable. So you could not edit nor delete the folder because it was not writable. So by us changing the folder permission to 777 we were now able to rewrite the folder and change necessary files.

Please let me know if this solution worked for you. It worked for me so I am pretty sure it would work for you.

Joe Granados the author

Joe Granados is the owner of WebDevTuts. He is also a web designer & developer who loves to design and develop websites. If you're looking for him you can find him via @webdevtuts
  1. Nevins says:

    Works for me, i was make me crazy, i can not delete drupal/sites folder. Now set 777 and delete without problems.
    Thanks man, Happy new year from Spain.

  2. Kyle Keeling says:

    I thought that changing the permissions would solve the problem and I had tried it before seeing your post, however, I still cannot delete the folders?!?!? It’s frustrating knowing that this has worked for others, so I’m thinking it may be an issue with my hosting provider…Just thought I would comment that switching to 777 didn’t work for me, in case anyone else runs into that problem.

    Regards,

    • Marcell says:

      Yeah Ive tried this method 3 times and it seemed to work for me. Make sure the folder permission is actually changing somethings the ftp client screws it up. Also did you make sure you’ve selected the sites folder and not a folder within it?

  3. Baria says:

    Hi,

    Tried your solution but am afraid it didn’t work for me:( But what I did was, i went deep into the folder and started setting the permission of each folder (couple of them) and started deleting my way up to the “sites” folder and it worked. So thanks for the heads up !

    • Marcell says:

      Yes that is what I meant you have to set all folders and files to 777 and you will be able to delete them. Thanks for clarifying.

  4. Mitchell says:

    Hi Marcell,

    Thanks for the tip, worked great! I had messed with permissions by checking off different boxes to no avail, but typing in 777 did the trick (it was at 705). As noted above I did recurse the change to all subdirectories and their files. Thanks again!

Leave a Reply