php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13054 Perl script running as root when starting it with system()!!
Submitted: 2001-08-30 06:12 UTC Modified: 2002-01-12 06:48 UTC
From: geert at kemuri dot org Assigned:
Status: Closed Package: Program Execution
PHP Version: 4.0.6 OS: Linux (RedHat 7.1)
Private report: No CVE-ID: None
 [2001-08-30 06:12 UTC] geert at kemuri dot org
Hi,

Apache is running as 'apache' user in group 'www-data', started by root (ofcourse). (version 1.3.20)
Perl script is a distribution script copying files with scp. Keys are located in the home directory of apache user.
PHP configured without a php.ini (thus default apply). Apache and PHP were compiled from source.
I'm php developers since the early beginning, and now almost fulltime PHP programmer.

Now!
system("/usr/local/bin/distributer.pl $audioid $newfilename 2>>/tmp/distributor.log 1>&2 &");

This should distributed files to our fileservers. But rather than running as apache-user (where the ssh keys are) it runs as root!!! I never, in all these years, saw this! I'm pretty unsure if this is true or if this can be?
I would like to here it is a missconfiguration of mine..
The logs of my Perl script show:

      Starting distribution as user root

The fact that it runs as 'root' compromises my security stuff and the project will not work..

Just tell me i'm wrong and this can't be true.. Or is this the way things are done? ;p


Geert

PS: i'm submitting this in a hury and didn't search possible submittes. call it panic.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-22 07:06 UTC] lobbin@php.net
Did you find a solution of this on your own? If not, can you try this with 4.1.0?

And you are sure the perl-script is not runnig setuid?


R.
 [2002-01-12 06:48 UTC] lobbin@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 22:01:30 2024 UTC