The Drupal created directories, files have incorrect user and group settings. Example:

balu@vas:~/projects/drupal/6/RC3/sites/default$ ls -al
total 20K
drwxr-xr-x 2 balu   users      1.0K 2008-02-05 19:29 CVS/
-rw-r--r-- 1 balu   users      8.8K 2007-12-20 10:35 default.settings.php
drwxr-xrwx 3 balu   users      1.0K 2008-02-05 19:30 files/
-r--r--r-- 1 nobody 4294967295 8.8K 2008-02-05 19:30 settings.php

This is from my local machine, but I just had the "luck" of bumping into this on a shared host, where I can't remove these files using cPanel. The last line is the Drupal created settings php.

Its not possible to write such files, not even using PHP based file manager (that normally should work since it runs under the webserver privileges). As a restult if you do install Drupal 6 on a host where you don't have root privileges it will be impossible to remove.

Comments

snufkin’s picture

Priority: Normal » Critical

i tried with uploaded files, same result. invalid user and group, which means the sites/default/files directory will be impossible to remove on hosts where one can't get root privileges. im setting it to critical, and hope someone can reproduce it.

my local testing environment was linux, shared host unknown (probably linux too).

scoutbaker’s picture

I have not had any issues in this regard. I've been working with RC3 and DEV without any issues on a shared hosting system. As a quick test, I just went in and deleted the files directory using cPanel. Then in D6 under Administer-Site configuration-File system I clicked Save Configuration and was able to recreate the directory and then delete it again.

techczech’s picture

This is related to the discussion in http://drupal.org/node/194369.

snufkin’s picture

#2: there is a /files folder which is shipped with Drupal, but by default it uses /sites/default/files, which is not. And the issue won't come up with this directory unless it was created by drupal. Try deleting an uploaded file to see if you can reproduce the issue .

pwolanin’s picture

Priority: Critical » Minor

um, this has been true for all of 6.x. Perhaps we should ship a little helper script to fix this? A PHP-based file manager must be able to set the permissions back, since PHP set them in the first place.

The problem may also occur for all files uploaded by Drupal, so you won't be able to remove any of the uploaded files. This is true for 5.x, 4.7.x, etc.

scoutbaker’s picture

@snufkin: There is no files folder. I did my testing against the sites/default/files folder created by Drupal, or recreated after I deleted it. I was able to successfully delete the uploaded files in the folder, and the folder itself. I also teste using both Public and Private files settings.

snufkin’s picture

pwolanin: its not true for 5.x, there an uploaded file for example gets -rw-rw-r-- 1 nobody users, so basically inherits the directory structure around and adds no user ownership.

ScoutBaker: can you by any chance check what are the file attributes and ownership settings for these created files on your install?

snufkin’s picture

I failed to reproduce it on another machine, though on my local computer i can, and also on the shared host. It seems this is PHP dependant, worked: PHP 5.2.0-8+etch7, not worked: PHP 5.2.5

scoutbaker’s picture

I don't currently have access to the ownership information on the shared host. The site is running on PHP 5.2.5 there however.

dpearcefl’s picture

This sounds like a OS and filesystem issue to me. is this still a reproducible issue?

snufkin’s picture

Status: Active » Closed (cannot reproduce)

I think you are right and its an OS related issue, so i'll close it.