# cat /var/service/cherokee/run
#!/bin/sh
PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/sbin:/usr/local/bin
if [ $(id -u) -eq 0 ] ; then
chpst -u mirror:www cherokee -C \
/usr/local/etc/cherokee/cherokee.conf
/usr/local/etc/cherokee/cherokee.conf
else
cherokee -C /usr/local/etc/cherokee/cherokee.conf
fi
#
This way, when root's supervisor process (re)starts the server the process has no elevated privileges. If any other user stops and restarts the process it executes normally with the privileges of that user. This setup means that we cannot run on port 80. As a remedy for this we run on port 8080 and redirect at the gateway.
This way, when root's supervisor process (re)starts the server the process has no elevated privileges. If any other user stops and restarts the process it executes normally with the privileges of that user. This setup means that we cannot run on port 80. As a remedy for this we run on port 8080 and redirect at the gateway.
No comments:
Post a Comment