1

I'm trying to give write permissions to Apache www-data group to be able to install new plugins directly from Wordpress webadmin console but it seems like these permissions are ignored. I have to give write permissions to www-data user and everything works fine. But why user and not just group? I'm working on Debian 7.5 with LAMP (Apache 2.2, php5, MySql 5.5) stack and Wordpress 3.9.1. Wordpress folders are on /var/www/mysite and the website is managed by a virtual host:

<VirtualHost *:80>
    ServerName my.site.com
    ServerAdmin thewebmaster@localhost
    DocumentRoot /var/www/mysite
    ErrorLog ${APACHE_LOG_DIR}/mysite-error.log
    CustomLog ${APACHE_LOG_DIR}/mysite-access.log combined
</VirtualHost>

www-data group seems ok getent group www-data says www-data:x:33:www-data and file permissions too. Showing ls -l this works...

drwxrwsr-x  5 www-data www-data 4096 Jun 19 07:22 mysite

and this doesn't (with root user as owner):

drwxrwsr-x  5 root www-data 4096 Jun 19 07:22 mysite

Any suggestions? Thanks in advance

Stefano Lazzaro
  • 387
  • 1
  • 4
  • 22
  • I actually ran into this exact issue today, exact same configuration (debian, apache, etc) I don't have a fix yet, but commenting since same config might be relevant - With my user as owner, On my Wordpress directory I initially ran `chgrp -R www-data`, then `chmod -R g=rwX`, and Wordpress would still ask for ftp info when modifying plugins. Then with `chown -R www-data` Wordpress is suddenly able to modify the files. Apache is configured correctly to use `www-data` as user, and like you `getent` shows the `www-data` user is in the `www-data` group. – Johannes Jul 11 '14 at 15:10
  • Thanks Johannes for the comment. I'm still looking for a fix. By now, poor solution, when I have to install plugins I'm changing the owner to the single user www-data. – Stefano Lazzaro Jul 15 '14 at 07:49

0 Answers0