5

So I have installed the latest Drupal 7 stable on my new server, and it asks for an FTP user/password every time I try to install a new module from a .zip file. (Or using an URL).

The problem is that I don't have an FTP installed on the machine, and I don't really want to install one. I'm pretty sure this is related to some configuration/permission, but I'm not sure where to start. Tried searching around about the question, but only found "random" answers. Nothing clean and/or official.

  • How did you install Drupal without FTP access, ssh ? If its dedicated server you should install a ftp. Or go with Drush like Clive suggested. – B2F Jul 14 '12 at 14:27
  • 1
    sftp. It's my own server. (ftp is not secure, and often exploited. I don't want to keep one around just for Drupal.) – Apache Jul 14 '12 at 14:34
8

It is a permissions issue...basically your web server needs permission to write to 'sites/all/modules' for Drupal to be able to get the new module folder there without using FTP.

However, it's a security risk to do this, so if your server is already configured in such a way that stops the apache/php daemons from writing to those folders you should keep it that way.

The better way to install modules automatically in Drupal is to use the Drush command line tool. You can issue a couple of commands:

drush dl views
drush en views

And the module will be automatically downloaded and installed on your site. Drush is infinitely more powerful than that (you can perform all sorts of administration tasks easily from the command line) so if you haven't come across it before I'd thoroughly recommend giving it a go.

  • Okay, there is a bit of a problem. I went to the public_html, issued the commands. The module got enabled. Yet, I can't set it up. It's in the modules, it's "enabled", yet I can't manipulate it. Every time I check the status page, it warns me about the AKISMET key. Then I click on the "Configure" text, and it drops me back to the main settings page, where I see the error (to check status). :/ – Apache Jul 14 '12 at 14:52
  • That sounds like a module-specific problem...which one have you installed? – Clive Jul 14 '12 at 14:55
  • AntiSpam. (I want an anti-spam module for comments, forum and registration.) – Apache Jul 14 '12 at 14:58
  • I'm not familiar with that one I'm afraid. Try going to 'admin/config/antispam' directly (which should be the main config page for antispam). Other than that it might be worth asking another question here about it, someone may well have run into the same problem before – Clive Jul 14 '12 at 15:05
  • Nope, doesn't work. Asked a new question. :) – Apache Jul 14 '12 at 15:12
2
  1. move with the shell to the parent root where your site is for example cd /var/www

  2. give proper permission to the directory where your site is:

    chown -R www-data {your_directory_name_here}

    example chown -R www-data Drupal

reference: http://allabouttodd.com/ecommerce/drupal-7-update-manager-unable-connect-ftp

I hope it helps!

0

This can happen when sites/default folder is not owned by the user that executes the install script. Make sure the folder sites/default is owned by the apache user (from your drupal root) and modules will be installed without asking for FTP credentials:

Ubuntu:

chown www-data sites/default

Fedora:

chown apache sites/default
-1

I had the same problem before I started using drush to install, enable, and manage themes and modules. Try these commands from the terminal.

drush dl;
drush en;
drush cc all;

protected by kiamlaluno May 30 '14 at 22:13

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.