- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: non-root user using TCP port 80
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
06-16-2004 04:15 AM
06-16-2004 04:15 AM
non-root user using TCP port 80
Does anyone know if this is true?
Is there a work around for it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 04:24 AM
06-16-2004 04:24 AM
Re: non-root user using TCP port 80
having said taht I am not sure whether it will function properly if you runt it as other user . It might run , but will function the way its supposed to , I don't know .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 04:33 AM
06-16-2004 04:33 AM
Re: non-root user using TCP port 80
When you install HP's port of apache depot a script like this(SUID i think) allows access to the port as part of the swinstall process.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 06:08 AM
06-16-2004 06:08 AM
Re: non-root user using TCP port 80
So if httpd must run as user fred, you must set user and group in apache.conf. If you want your user fred to be able to launch the apache server, you can chown httpd process to root, and setuid it, but it might cause security holes.
chown root:root /opt/apache/bin/httpd
chmod +s /opt/apache/bin/httpd
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 07:13 AM
06-16-2004 07:13 AM
Re: non-root user using TCP port 80
Yes that is true - only processes owned by root can bind to the ports less than 1024.
But there are work arounds.
1) There is a tunable tcp parameter tcp_smallest_nonpriv_port
# ndd -get /dev/tcp tcp_smallest_nonpriv_port
1024
#
This parameter refers to the smallest port a non-root user process can bind to.
You can decrease to say 80. Though I would not recommend doing it.
2) Some binaries do have the option of being started under a different username. Like for example the named process. named binds to tcp/udp 53. but you can start named under a different user name using -u option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 05:30 PM
06-16-2004 05:30 PM
Re: non-root user using TCP port 80
For security reasons, nost OS's don't allow non-privileged users to start listening on this ports.
If daemons continually run as root however, this causes possible security holes if the daemon can get exploited.
This is why daemons such as Apache and Bind/Named allow you to run as a non-priviliged user.
It still needs root privileges in order to launch, so it can bind to the port, but that's all the 'root' user is required for. Once bound, the daemon spawns children off to less privileged UID's for security.
Even though these daemons end up running as a non-privileged UID, they still can't be started by a non-privileged user because of the port it listens on.
If you want to be able to manage Apache as a non-privileged user ('fred' you said?), being able to stop, start, reload configs etc., then you need an 'SUID' wrapper to do such things.
So to answer your question, Yes. It's True. A non-privileged user cannot *launch* a daemon of which listens on a port below 1024.
As for work-arounds, yes there are. Steven mentioned that there was a wrapper with the 'swinstall' packages, and I'm sure there are a number of other's written by people who want to do a similar thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2004 02:56 AM
10-20-2004 02:56 AM
Re: non-root user using TCP port 80
You can get it from the HP-UX porting center:
http://hpux.cs.utah.edu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2004 03:02 AM
10-20-2004 03:02 AM