httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mário Gamito" <>
Subject [users@httpd] Problems with permissions
Date Fri, 04 Apr 2008 10:12:25 GMT

I have this PHP code to add an alias in a DNS server (djbdns).


$username = 'foobar';
system('/etc/tinydns/root/add-alias' . ' ' . $username . ' ' . ';
system ('make');


If I run in the shell as root:

# php dns.php

all is well, the entry is created.

Os course, that running through Apache, it isn't, because Apache is
running under nobody.nobody

Here are the relevant permissions and ownership:

/etc/tinydns -> dtrwxr-sr-t -> root.root.
/etc/tinydns/root -> drwxr-sr-x -> root.root
/etc/tinydns/root/add-alias -> -rwx-r-xr-x -> root.root
/etc/tinydns/root/data -> -rw-r--r-- -> root.root (the file in which
the command add-alias inserts the data)

How do I turn this around so that Apache executes add-alias and make
command without compromising (at least too much) security ?

Any help would be appreciated.

Warm Regards,
Mário Gamito

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message