[SOLVED] init script, centos/rhel, lighttpd, specify user
Linux - GeneralThis forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hello all, I'm trying to write a simple init script for lighttpd on CentOS4. Not that I've done this before, I'm just reverse engineering another init script. However, and I can't seem to figure out how to get lighttpd to run under any user but root. Can someone give me a clue, or point me in the right direction?
Thanks.
Last edited by s2cuts; 10-02-2009 at 08:35 PM..
Reason: solved
The config file for lighttpd (lighttpd.conf) has parameters "server.username" and "server.groupname". When launching lighttpd in the init script with the daemon() function (or whatever your distro uses), these parameter values are used. Remember to make sure the the designated lighttpd user has permissions to all the places it needs to go, namely: root html directory, log files, etc...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.