or something sane:
usermod -l apache www-data
groupmod -n apache www-data
I wonder is there are any other hidden snags — like file user and group permissions?
or something sane:
usermod -l apache www-data
groupmod -n apache www-data
I wonder is there are any other hidden snags — like file user and group permissions?
also fixed the ordering in /etc/passwd so that it is sorted by UID by default
and /etc/group
unbelievable!
repercussion:
#/etc/init.d/apache2 reload
apache2: bad user name www-data
…fail
edit /usr/sbin/apache2ctl and change this line:
install -d -o ${APACHE_RUN_USER:-apache} ${APACHE_LOCK_DIR:-/var/lock/apache2}
next, edit/etc/apache2/envvars:
export APACHE_RUN_USER=apache
export APACHE_RUN_GROUP=apache
also, need to install lynx???
#apt-get install lynx
In fact you could keep the default value
www-dataof$APACHE2_RUN_USERinside the expression${APACHE2_RUN_USER:-www-data}.The problem in that the variable
$APACHE2_RUN_USERis not defined in the file/etc/apache2/envvars, so you have to rename this variable to$APACHE_RUN_USER.After having created the
apacheuser and group, the following line will also work :${APACHE2_RUN_USER:-www-data}, because the default value will not be used.Nevertheless, as the
www-datauser does not exist anymore, it is far better to replace the default value byapache, as you said.And Lynx (or Links) is needed by
apache2ctlto display the status of ApacheMany thanks for your entry.
Jean-Philippe
Thanks. You are right. I’ve forgot about those details.