After changing ownership of a Drupal installation to the SFTP user using the folder, Drupal started to show peculiar behaviour. Whenever I tried to install any module or theme through the web interface, Drupal 7 would ask for the FTP login credentials. Although making changes through SFTP is okay, sometimes the web interface is much more convenient.
Problem: Drupal 7 would not allow installation through the web interface without needing the user to type in the FTP login.
Impact: Inconvenience.
Solution:
This is a simple solution. I was using LAMP setup (Ubuntu Linux), so all I had to do was change the owner of the /sites/default folder in my Drupal installation to www-data (Apache). This makes Apache (or, the Drupal website) the owner of the folder. Since this is the folder that Drupal needs to write to during installations, that's all that was needed.
To do this in Ubuntu/Debian Linux just type in the following in the terminal:
sudo chown -R www-data:www-data [path to Drupal installation]/sites/default
You could also just cd to your Drupal installation first if you find the path too long and hard to follow then type:
sudo chown -R www-data:www-data sites/default
Note that the flag -R means to recurse throughout whatever's in the folder. You don't always need this flag if you don't want everything in the folder to also be owned by www-data:www-data. Another thing to note is that www-data:www-data denotes the user www-data (Apache) which is in the group www-data (Apache group), in the form of user:group.
Sunday, February 10, 2013
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment