Installing Modules in Drupal without using FTP

Let's make a quick note about installing modules in Drupal7. Usually when moving your site from your localhost to your production server, you will notice several problems in moving your site.

One of those problems is when you're installing  new modules in your site using the url in  the Drupal modules page and then this wild pokemon appear:

Drupal FTP Installation
This is not the normal way that Drupal7 use to install modules. you are going to see this interface when the file owning and permission in Drupal dont work.

So, how do I fix this?

Easy, well this depend on what Linux are you using (please use Linux). You can always see the Linux version using version in the command line.In my case, I use Ubuntu and to fix this you must go to var/www/html7yoursite/sites and then exec this litle gem:  sudo chown -R www-data *.

There, fixed :)

What kind of Magic is this?

Well, usually in Drupal, you must give permission to the Apache user (if youre using Nginx, I assume is the same) so Drupal can work as usual. In this case we do a chown with -R (recursivity) putting www-data (the Apache user usually in Ubuntu)  as the owner of all files inside sites. You welcome ;)

No comments: