[Gllug] Apache access to root-owned files

- Tethys tethys at gmail.com
Thu Jan 25 16:00:33 UTC 2007


On 1/25/07, Christopher Mocock <chris at wavestore.com> wrote:

> Obviously when finished, the script needs to be able to write to the
> root-owned /etc/sysconfig/network-scripts/ifcfg-eth0 file.

Option 1: It's a specialized application rather than a general purpose
machine, so there's no reason why that file couldn't be owned by
apache rather than root.

Option 2: A sudo entry that allows apache to overwrite that file.

In both cases, though, you'll probably want to have some fairly strict
validation on the contents of the file before it's written. Otherwise,
you're likely to end up with a broken network, and hence no web access
through which the user can fix it.

Tet
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list