Applies To:
[ Zend Server on Linux ]
Follow the below procedure to change the Apache user when Zend Server has already been installed.
If you have not yet installed Zend Server, configure the Apache (from distro) settings to your specifications before installing Zend Server. |
Before running this procedure make sure that you:
If there are still resources owned by the old Apache user you might get permission errors in Apache and PHP logs, and have a problem running your web applications. |
For this article we will be using as example values:
# id <old Apache username> # id <new Apache username> |
# /usr/local/zend/bin/apachectl stop # /usr/local/zend/bin/zendctl.sh stop |
# /usr/local/zend/bin/zendctl.sh status # ps aux | grep -e zend -e apache -e httpd |
; UID of httpd process zend.httpd_uid=1001 ; GID of httpd process zend.httpd_gid=1002 |
WEB_USER=momo |
# find /usr/local/zend -user apache -exec chown momo {} \; # find /usr/local/zend -group apache -exec chgrp momo {} \; |
# usermod -A momo zend |
# /usr/local/zend/bin/zendctl.sh start |
After performing the procedure, everything runs with the new Apache user.
Please verify the changes by checking:
1. That all services are up and running.
2. Execute zendctl.sh status.
3. Check the Admin GUI thoroughly.