• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to change effective user id on Windows

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apache server on Linux starts as root to bind to
port 80, and then switches effective user id to nobody. Windows does not
appear to have concept of changing effective user. WCs Apache service runs
as a local system on Windows. Need to change the user for Apache
after binding to port 80.

Any ideas how to do this programmatically using Java or shell scripts?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can run a Windows service as a specific user, if that's your question. I can't see what this has to do with Tomcat though.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think quite a few people are confused because the Apache HTTP server is commonly known as simply "Apache", and now that the "jakarta" moniker has been phased out, it's "Apache Tomcat".

However, I'm pretty sure that there are a whole set of Windows API calls that allow running processes under alternate user identities, and I would not be surprise to see Apache (HTTPD) employing them. Some versions of Windows do (I think) enforce the "admin users only" rule for listening on ports below 1023, so simply running Apache itself as an alternate user wouldn't work on those systems.

But we're not real knowledgeable on that stuff here, so it might be better to find a forum that deals with the Apache HTTP server itself. Although first, I'd check the FAQs on the Apache website, since this is a common requirement.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic