Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: How to run Apache module with superuser privileges? |
|
Author |
|
shrutigosavi26
Joined: 19 Mar 2016 Posts: 2 Location: Germany
|
Posted: Mon 04 Apr '16 13:37 Post subject: How to run Apache module with superuser privileges? |
|
|
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: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 04 Apr '16 16:00 Post subject: |
|
|
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 |
|
|
|
|
|
|