Excited about D7. Installed to check it out. Tried to install a module using the update features but got an error.

1) Install D7
2) Click Modules from top menu. Click "Install a new module"
3) Find views module on drupal.org. D7 version is: http://ftp.drupal.org/files/projects/views-7.x-3.x-dev.tar.gz
4) Paste into "Install from a URL" field and press "Install"
5) Error page:

"Authorize file system changes
WARNING: You are not using an encrypted connection, so your password will be sent in plain text. Learn more.
Connection Method: FTP (only FTP available. Original URL is HTTP which seems easier)
Username: admin user
Password: probably admin password
Advanced settings:
host: localhost
port: 21

It seems like this should just do the HTTP download instead of mucking with the FTP settings. An error? Especially a problem because it's a drupal.org URL - seems like a pretty common use case.

Thanks!

Mike

Comments

dww’s picture

Status: Active » Closed (works as designed)
Issue tags: +Update manager

You misunderstand what authorize.php is asking for. It's asking you to provide the FTP credentials for your webserver so that it can install your new files as you, the user that owns the files (instead of as the user that your httpd process and the PHP scripts it runs, e.g. Drupal) is running as.

dww’s picture

You misunderstand what authorize.php is asking for. It's asking you to provide the FTP credentials for your webserver so that it can install your new files as you, the user that owns the files (instead of as the user that your httpd process and the PHP scripts it runs, e.g. Drupal) is running as.

dww’s picture

Category: bug » support
Priority: Major » Normal
wisemanIV’s picture

I've installed the Drupal Quickstart appliance and I'm having the same problem. How do I know what credentials to use for FTP. How do I know what my web server credentials are?

Mycroftt’s picture

I've been fighting the same problem for several hours. I have the module I want to install on my desktop and I can point the installer to it but I'm still asked for FTP credentials. FTP has nothing to do with what I'm wanting to do. I even unpacked the files and placed them in my modules folder manually. Drupal7 can't see them. I've tried to point the installer at the .tar.gz file and at the unpacked file and neither works. I'm working directly on my testing server and the file(s) are available locally. I should not need FTP.
Linux Debian Lenny9
Apache2.2
Drupal 7

I beginning to suspect this is a bug or an oversight. any thoughts?

In a fit of desperation I looked into manually editing the database with phpmyadmin. I found the modules table but I don't have the information I need to force Drupal to see my newly installed module files. It was worth a try, I suppose..

OK, I feel really stupid. I had copied the unpacked module files to /drupal-7.0 instead of /var/www/drupal-7.0... everything's OK now "never mind"

mlanning’s picture

I'm having the same issue, but it doesn't look like this thread has resolved it? I'm on a fresh install of quickstart, and when I try to add a new module to example.dev, it's asking for my server connection details.... user and pass. What are they? How do I find that information?

jeroenf1973’s picture

any luck on this....? still struggeling.

webered’s picture

well I ran into the same problem (I think)
hi @ all

I am still trying and testing on my local machine ...

so as I understand drupal is asking to have the root or master login for my lamp server.
I supose that while installing the lamp server (on ubuntu) this was introduced automaticaly as I used a script (dont remember how it was called but was something like a batchjob) ... may be I was asked and I just used some predefined data, installing was a hell of quick ...

now I need to know where to find this data ...

if you run your site (the drupoal site) on a hosted server it seems clear to me that the hoster should be able to give you the data.

I would apreciate any idea/help to get hands on the data for localhost ...

thanks in advance

cmulloy’s picture

Hi,
I ran into a similar problem installing a module on my Ubuntu OX test PC.

I gave up using the 'install a new module' on the modules section, either the 'Install from a URL' or 'Upload a module or theme archive to install' as I kept on getting FTP errors. I know that others have said that the FTP connections are for logging on to your PC (not the FTP ID and password for downloading from the modules location). Even when I installed vsftpd which basically sets up an FTP server on my PC, I got an error message when I used the 'Upload a module or theme archive to install' method as the Drupal installer didn't have the permission to create a sub-directory in /var/www/drupal/sites/all/modules !

The following approach worked for me in installing a module. Basically you download and unpack the module and move the unpacked modules into a newly created subdirectory in /var/www/drupal/sites/all/modules/ (typically).

There's quite a good URL on installing Drupal modules here which gives the actual commands for downloading and installing: https://help.ubuntu.com/community/Drupal#Adding_modules

It would be great to be able to download and install modules more easily on a Linux box or is there something I haven't set up correctly?

Ciaran

csxdb’s picture

Hi,

Hope the following is of some use to Quickstart users that are having a problem: The Drupal "Install module from a url" procedure requires FTP access to the server on which Drupal is running. Quickstart doesn't come with FTP pre-installed, so you have 2 options:

a) Install and configure FTP on the Quickstart server, in which case you can:

  1. use the "Install module from a url" feature, which is what you wanted, and (as a side-benefit, but a very useful one):
  2. use an FTP client (e.g. FileZilla) on the host machine (your typically Windows PC on which you're running the Virtualbox in which Quickstart is running) to send other files up to the Quickstart server and get files down from the Quickstart server.

b)

  1. Use Drush to install modules etc. You probably used Drush after installing Quickstart to set up your Drupal site, so why not continue with that? Just open a terminal window, cd to site directory & key in:"drush dl module".
  2. As regards second item above, I set up a shared folder which is visible as a native folder from both the Windows host and the Ubuntu guest. A better solution. I think I used "How to: Use shared folders" (https://forums.virtualbox.org/viewtopic.php?f=29&t=15868) from virtualbox.org to do this, was relatively glitch free. (see also https://forums.virtualbox.org/index.php)

Well, the above was my preferred modus operandi, but I may install FTP on the Virtualbox Ubuntu server for some other reason and based on my experience with Ubuntu that should go well (great documentation, testing etc.). If that happens, I'll be able to use the "Install module from url" option without getting the error screen ("Install method: FTP. FTP Connection settings..."), but I probably never will :-)

Colm

ujn’s picture

2All, this solution I use for my quickstart drush sites:
chown www-data:www-data -R .

this should change owner for all files and directories. After this precedure, installing modules over http is not problem.

dww’s picture

Re #11: *sigh*. That undoes the whole point of the update manager -- now all the Drupal source code is owned by the webserver user, which is a dangerous configuration to be avoided if at all possible. If you're using drush anyway, don't do #11 and don't use the Update manager. Just use drush to update your site. You'll be much happier that way (drush supports many more features than the Update manager does/can), and your site will be more secure.

Re: #8: "so as I understand drupal is asking to have the root or master login for my lamp server." -- nope. It's asking for the FTP credentials of the user who owns all the Drupal source code files on your webserver. If that's root, then yes, it's asking for your root password, but these files definitely do not need to be owned by root, and your life will be better if you have a separate (non-root) account that owns the files. However, you do not want the files owned by 'www-data' or equivalent (whatever user your webserver runs as). Make a 'www-files' user (or something), have all the Drupal files/directories owned by that user, and use that for the FTP authentication part of Update manager.

I wish there was some way to better document and explain what Update manager is doing and why, but I doubt anyone's going to find or read those docs. We probably need to fix the text directly in the UI itself...

adjenks’s picture

Issue summary: View changes

Okay! So. after reinstalling and repeatedly chowning folders until I made it past that request for FTP details, I finally got it to ATTEMPT to download the file. All I had to do after a fresh install was sudo chown www-data /var/www/html/sites/default. What confuses me is why that would work. Beause before and after chowning, the permissions were dr-xr-xr-x 3 www-data 6226 4096 Jul 20 09:03 default for the default folder. So my understanding is that the owner, group, and others could all all read and execute, so why would changing the owner even matter? Anyways, chown the default folder to www-data and it worked for me.

ccbearyeh’s picture

After my testing.
First of all, you need to change the owner to sites/default folder to www-data
sudo chown -R www-data:www-data /sites/default
Then, change permission of modules folder to 775
sudo chmod -R 775 /modules

it works for me.