Suggestion: distribute a .tar.gz or zip file that doesn't have "drupal.../" prefixing all of the file paths. Then when this file is uploaded to public_html and expanded, everything will be in the right place.

Comments

pulsifer’s picture

Title: distribute .tar.gz without "drupal.../" in file paths » another possibility?

If you want to keep a prefix for all files in the .tar.gz, another possibility might be to use "public_html/" as the prefix instead of "drupal.../". Then this file could be uploaded to the root and expanded, placing its contents into public_html.

pulsifer’s picture

Title: another possibility? » distribute .tar.gz without "drupal.../" prefixing the file paths
webchick’s picture

I'm going to -1 this request...

I absolutely can't stand it when I extract something and it dumps it all over my root directory without warning. Please keep it in a folder, then I can move the files to the root, or rename the folder, or whatever else I want to do with it.

Also, public_html is not a universal naming convention so makes even less sense than leaving it 'drupal'. Apache's default root is 'htdocs', IIS's default root is 'wwwroot', and shared hosting environments will set this up in a myriad of different ways.

bradlis7’s picture

Also a -1 on this. Whenever extracting to a computer, most zip programs do not automatically put it into a folder, and so if you put it on your desktop, you end up with 25 files that were extracted that you have to guess to see which ones were extracted. It's easier to move the files to a folder up than to move them to a new folder from an already cluttered folder.

killes@www.drop.org’s picture

Status: Active » Closed (won't fix)

I also disagree. The proposed behaviour of tgzs is most disturbing.

pulsifer’s picture

Just to clarify, the proposal is to distribute an unprefixed installation archive IN ADDITION TO what is distributed now. No one has to use it if they don't want to, but many users, esp. novice users, would benefit from it. With a prominent warning on the download page, there should be no confusion about what the purpose of the file is and what it does.

webchick’s picture

Sorry, but I honestly don't understand the problem here?

It seems to me a novice user would be the first one to download that file, save it to their Windows desktop, right-click, Extract All... and then end up with 20 files/folders on their desktop mixed in with other things, which they then have to hunt down in order to move into whatever folder they want. That seems about as un-user-friendly as you can get.

As opposed to right-clicking, Extract All... and then getting a single "drupal" folder containing the contents. This way it is clear what files belong to Drupal as opposed to being one of the other 50 files/folders on their desktop, and they can select all files and move to whatever folder is right for them (public_html, htdocs, wwwroot, etc.).

Definitely a won't fix issue, imo.

pulsifer’s picture

The goal is to achieve a "root" drupal installation, i.e., one that runs at http:/www.host.com/ instead of http:/www.host.com/drupal/.

The reason this is an issue for novice users is because the easiest way to upload files to the typical LAMP web host is to use the cPanel File Manager. A targz or zip file can be uploaded to public_html and then decompressed by clicking on the file name and then clicking on "Extract File Contents". When doing the expansion, the File Manager places the files into the location indicated by the paths stored in the archive. Therefore, when the current distribution file drupal-4.6.5.tar.gz is uploaded to public_html and expanded, its contents are placed into public_html/drupal-4.6.5/. There is no easy way using File Manager to copy the files en-mass to another location.

In comparison, if "drupal-4.6.5/" did not prefix the path of the files in the archive, the targz file could be uploaded to public_html via the cPanel File Manager, expanded, and all of the files would be in the "right" place.

For a recent report of this problem, see http://drupal.org/node/52602. See also http://drupal.org/node/25310, which reads: "Make sure the files and directories are copied to the document root. Move them one by one if necessary."

So one way to solve this "pain" for many users is to distribute a targz that does not have the "drupal-4.6.5/", along with appropriate instructions and warnings on the purpose of this file and how it should be used.

Another possible way to address this "pain" would be to reduce the number of files that need to be copied in order to achieve a "root" drupal installation. The only two files that would definitely have to be copied to public_html are .htaccess and index.php. If there were a way to make drupal run with those two file in public_html while the rest of the files were located in public_html/drupal/, that might also be a good solution.

Note that one approach that is not a solution is to expand the files from the account root and then rename drupal-4.6.5 to public_html. The reason this does not work on most web hosts is because public_html has special group ownership which cannot be set from the cPanel. In order to set the corrrect group ownership you need to ask customer service to either do it for you or to allow you to access your account via SSH. Therefore the only good solutions for novices involve expanding a file that has been uploaded to public_html.

pulsifer’s picture

It should be noted in closing that for a new user, this "pain" is both real and significant, while a solution would be very easy to implement.

greggles’s picture

The pain may be real, but if we made the changes as proposed we would just be trading one pain (moving files into the subdirectory) for another (upsetting folks who are used to the archive being a directory of its own who expand the file somewhere only to have that directory littered with trash).

If you don't have the ability to easily move /drupal-4.6.5/ to / then I recommend that you take an interim step: unzip the archive on your desktop, make a new archive that doesn't include a directory, and upload your own directory.

I agree with webchick and killes that we should not deviate from the current behavior.

chx’s picture

there is no issue in here. every tarball on the web behaves like this and I would be very upset if it would not be so. Are we _really_ debating whether a file movement command is a problem? Also, if you have downloaded to your desktop and you are using FTP to upload then we are debating a _directory change_ before upload.

webchick’s picture

Ok. Sounds like this is a problem for CPanel users specifically then (which explains why all the developers are scratching their heads ;)), and one which can be solved with clearer documentation.

I've put in a reply in the documentation issue about the HOWTO page to clarify instructions for CPanel users here: http://drupal.org/node/49791#comment-79078. Feel free to add your own comments, pulsifer!