logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



How to run Apache module with superuser privileges?

 
Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads



View previous topic :: View next topic  
Author Message
shrutigosavi26



Joined: 19 Mar 2016
Posts: 2
Location: Germany

PostPosted: Mon 04 Apr '16 13:37    Post subject: How to run Apache module with superuser privileges? Reply with quote

I am using Apache 2.4 on Ubuntu. I have written one module in C language and integrated it into Apache server using Apache Extension tools (apxs). There is some part of my code where I am calling executable using exec function but I want to call that executable as superuser. so I want to run my module with superuser privileges but by default Apache is running as www-data user and asking for password for www-data.

Is there any way to run this module using superuser privileges?

Otherwise is there any other way to run root command in C within Apache module?

Is it possible to use suExec module for this?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6255
Location: Germany, Next to Hamburg

PostPosted: Mon 04 Apr '16 16:00    Post subject: Reply with quote

In the main apache config file there is User and Group. Which can be set to root. Of cause that is a big security issue.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads
Page 1 of 1