Applying chgrp "apache" to entire directory failed
I've been tried to change group of the whole directory with code example below [bash terminal on ubuntu 11.10]:
chgrp apache -R ./test1but failed and said :
chgrp: invalid group: `apache'user and group in httpd.conf is set to "apache".
1 Answer
If you've installed Apache via sudo apt-get install apache2 or with sudo tasksel install lamp-server then the default group is www-data not apache you'll need to use that group name instead (You may also need to update the Apache configuration file).
If you've custom compiled it, or using a 3rd party source, you will need to make sure the apache group actually exists. You can check by typing the following in the command line:
cat /etc/group | grep "apache"If no results are returned then you'll need to create the group, you can do so with sudo addgroup apache. However, at this point I STRONGLY ADVISE you use aptitude to install Apache, as by using the apt package manager you'll always stay up to date and configuration (including group creation) will be done for you.