For when people want to remove a drupal installation from the server, the content within the sites/default directory is not deletable unless you have root privileges.
* What are the steps required to reproduce the bug?
ssh: rm -r default/ within the sites directory.
* What behavior were you expecting?
not to see the default/ directory anymore
* What happened instead?
unable to delete any of the content within that directory.
Please include as much information as you can:
OS = Windows Vista Business Edition
webserver name and version = Apache/2.0.54 (Unix) PHP/4.4.7 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2
PHP version = PHP Version 4.4.7
Drupal version = 6.0-dev
Drupal path = #
and everything else you might feel is relevant
-> MySQL: 5.0.24a
-> did not find an "uninstall drupal" feature within the admin section that could fix this problem.
Comments
Comment #1
simeI'm a hack but I think if you added it, you should be able to remove it. Did you use some sort of script installer to install it? Or did you connect to the server with the root account to install, but then to delete you are connected as another user?
I'm marking won't fix because it's not a Drupal thing. On the file system, drupal is just a bunch of files.
But Try
rm -Rf default
otherwise, do a
whoamiand then als -laand feel free to post the results.Cheers
Simon
Comment #2
jswaby commentedIn this version, Drupal actually creates these files.
I used the new installed that comes with Drupal 6, not fantastico or anything like that. Did I connect as root? No, the nice people at dreamhost.com aren't nice enough to give me root access on any of their servers.
I consider this a big problem because if you can't cleanly remove drupal from a system without root access, it actually effects the file system structure. This is the first time in my 2 and a half years of using drupal that this problem has come up.
as per your suggestion:
Now do you see the problem? It's directly related to the new installer.
Please Simon, if you have any other suggestions on how to deal with this, please post. But I'm pretty sure this is a drupal problem.
Comment #3
simeThanks for posting the extra info. My hacks are depleted, the floor is open :)
Comment #4
jswaby commentedit's the default directory that is not writable. change it to writable and delete the directory.
Comment #5
michaels-musings.com commentedHopefully I've gotten all this right to make this a fix for the 7.x branch.
The /sites/default directory in 6.x is non-writable, and as such causes numerous problems in addition to just not being able to remove it from the command line. Other issues include: can't reliable copy or make a backup of a site with CPanel, can't delete a site using CPanel, etc. Realistically most anything you would need to do to upgrade or test a Drupal site are impacted as normal means to create testbed areas from in-production sites don't currently work without the user resorting to the commandline.
The worst case problem seems to be a novice user trying to use CPanel to make a backup of their site. CPanel seems to indicate to the user it's copied all the files/directories correctly, but the contents of /sites/default are not copied.
Request: In D7.x make the /sites/default directory writable again.
Comment #6
mcrittenden commentedSubscribe.
Comment #7
ruplRan into the same problem trying to wipe my web directory clean on Dreamhost. To summarize the above posts, the problem was solved by executing two commands from the web root:
Comment #8
mcrittenden commentedComment #9
dibya commentedit is working . Thanks rupl.
dibya
Comment #10
jp_lew commentedHad the same problem until I read bboyjay's comment.
I went "chmod 777 default" and all was good. Thanks.
Comment #11
dibyadel commentedthaaks. It is working
Comment #12
pguillard commentedComment #13
pfrenssenHijacking this issue since it is appearing as the top search result when looking for the way in Drupal 8 to make the sites/default folder temporarily writable on development machines.
This can be done by enabling the development overrides in
example.settings.local.phpand making sure the following setting is enabled:See the documentation in
example.settings.local.phpfor more information.For reference, this functionality was developed in #1232572: Add a variable to disable fixing file permissions during system_requirements() "runtime" checks and added in commit 854898258d67ab.
Comment #14
pfrenssenChanging status from Won't Fix to Duplicate since this can be confusing. In the meantime this has been actually fixed. See my previous comment for details.