I got a error when trying to install modules. What should I set up for the FTP? I just learned Drupal. Who knows what happen? I am using Drupal 7.7.


5 Answers 5


As kalabro said:

Make sure the folder /sites/default is OWNED by the user that executes the drupal scripts.

On most Ubuntu installations, this is the user Apache user www-data.

chown www-data sites/default
  • Under macOS chown _www sites/default and chown _www modules. Commented Jul 23, 2019 at 14:35

Updating modules using that method works only if the server running Drupal also runs a FTP server; in that case, you need to enter the username and the password to connect to the FTP server. The server is normally "localhost" as both the web server and the FTP server are running from the same IP; if that is not the case, then you should change "localhost" with the name of the server (e.g. ftp.example.com).

If you are running Drupal on your local computer, as when you use it as testing site, then if you don't have a FTP server on your computer, you cannot use that way to update modules; in that case, you just copy the files on your computer, after you download the archives containing the updated versions.

  • 1
    I have a vsftpd already installed on my local machine and is running. Do I need to create an additional FTP account which its root directory is same as the Drupal's Web server directory?
    – Kit Ho
    Commented Aug 27, 2011 at 3:08
  • That is how the FTP server on my web server is configured. Once you created the account, you use the login credentials in the form you shown in the screenshot.
    – avpaderno
    Commented Aug 27, 2011 at 3:13
  • 1
    No luck. I have an FTP account pointing to my web server root directory. But it is still failed after I enter the credential.
    – Kit Ho
    Commented Aug 27, 2011 at 3:37
  • Did you try copying any file using an FTP client, and verified the data for the login are correct?
    – avpaderno
    Commented Aug 27, 2011 at 3:41
  • 1
    Check this, please. Quote: To avoid this, make sure the folder /sites/default is OWNED by the user that executes the drupal scripts. On most Ubuntu installations, this is the user apache user: www-data.
    – kalabro
    Commented Aug 27, 2011 at 16:23

Do not make www-data own /sites/default or any other folder except for /sites//files or /files once the site is live. The "install module" feature within drupal should only be used during site development, when the site is not live. The server should not be able to write to /sites/all or /sites/default or any other folder (except files) as this is a security risk. Again, it may seem convenient to do it that way, but having the server write to any folder except files is a very bad plan. You may be pwned.


I have run the following command and it workes wonder!!

sudo chown -R www-data sites/default

In case, if you've access to /sites/all/modules directory then you can also prefer directly uploading the module-name.tar.gz:

  • extract the zip copy the directory to /sites/all/modules/
  • In web-site, navigate through admin-bar -> modules
  • check the module in the list
  • Save configuration

This should install the new module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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