httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben RUBSON <ben.rub...@gmail.com>
Subject [users@httpd] root perms / rewritemap prg / module system()
Date Sat, 16 Apr 2016 22:00:18 GMT
Hello,

When Apache is started from root user (as all services are), even if it then switches to the
configured user:group, the rewritemap programs run under root user.
I use this "trick" under some circumstances to run some tasks under other identities from
a rewritemap program.pl :
system("su - otheruser -c '/run/this/task -now'");

As I wrote my first Apache module a few hours ago and as it was quite easy, I was thinking
about migrating this rewritemap program part to a more elegant module solution.

However, when module is used, Apache has switched to configured user:group, I then think I
will not be able to run commands as root from a module.

Then my question is, could it be possible ?
I could use sudo, but perhaps there's a more elegant built-in solution.

Thank you very much !

Best regards,

Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message