logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


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

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: How to run Apache module with superuser privileges?
Author
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: 7288
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


Reply to topic   Topic: How to run Apache module with superuser privileges? View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads