root perms / rewritemap prg / module system()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux