- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Starting up apache with user apache
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 01:24 AM
11-14-2002 01:24 AM
I wuold like to do an intelligent script for start and stop apache from user apache and not root.
Could someone suggest me something?
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 01:39 AM
11-14-2002 01:39 AM
Re: Starting up apache with user apache
In your httpd.conf you could specify the user.
See:
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
# . On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user www and use that user.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group nogroup on these systems!
#
C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 01:49 AM
11-14-2002 01:49 AM
Re: Starting up apache with user apache
you are right, but is not exactlly what I want.
Following your post, the situation will be:
[h3mih153]/home/apache#ps -ef |grep httpd
www 12269 12202 0 09:47:15 ? 0:00 /opt/apache/bin/httpd
www 12206 12202 0 09:40:10 ? 0:00 /opt/apache/bin/httpd
www 12270 12202 0 09:47:16 ? 0:00 /opt/apache/bin/httpd
www 12207 12202 0 09:40:10 ? 0:00 /opt/apache/bin/httpd
www 12203 12202 0 09:40:09 ? 0:00 /opt/apache/bin/httpd
root 12202 1 0 09:40:08 ? 0:00 /opt/apache/bin/httpd
www 12271 12202 0 09:47:16 ? 0:00 /opt/apache/bin/httpd
www 12204 12202 0 09:40:10 ? 0:00 /opt/apache/bin/httpd
www 12205 12202 0 09:40:10 ? 0:00 /opt/apache/bin/httpd
This is correct, but I wuold like to change the owner of the father of pid (actually is root) in apache.
Thanks !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 02:25 AM
11-14-2002 02:25 AM
Re: Starting up apache with user apache
Ok I now understand your question fully.
But I don't know if this is possible at all.
See:
# If you wish httpd to run as a different user or group, you "must" run ----> MUST
# httpd as root initially and it will switch.
But then again maybe someone else has done this before.
On my system it's the same as your example.
C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 03:05 AM
11-14-2002 03:05 AM
SolutionFor your requirement to work you will have to change the ownership of httpd execuatble to user apache. And you will have to specify the port in which httpd listens above 1024 , say 8080 and give proper read and execute permissions for apache files for user apache.
Normal user processes cannot bind to the ports lesser than 1024.
So even with "User" option in httpd.conf , apache is designed in such a way that parent httpd has to run as root for binding to ports lesser than 1024 ( port 80 as standard http port).
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 03:25 AM
11-14-2002 03:25 AM
Re: Starting up apache with user apache
It works fine!
Bye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 03:32 AM
11-14-2002 03:32 AM