View Single Post
Old 8th February 2006, 21:06
st2xo st2xo is offline
Join Date: Jan 2006
Location: Wiesloch [DE]
Posts: 47
Thanks: 3
Thanked 0 Times in 0 Posts

Originally Posted by falko
root is not ok. Then something's strange on your system...
Hi Falko

I found the "root" the code in
in function
apache_user(), Line 1777
If I put in a hardcoded wwwrun all file permissions will be ok.

function apache_user(){
  global $mod;
  $httpd_conf = $mod->system->server_conf["dist_httpd_conf"];
  $includes = $mod->file->find_includes($httpd_conf);
  $anz_includes = sizeof($includes);
    $includes[$i] = $mod->file->unix_nl($mod->file->no_comments($includes[$i]));
    if($line = $mod->system->grep($includes[$i], "User", "w")){
      $lines = explode("\n", $line);
      $line = $lines[0];
      $line = trim($line);
      while(strstr($line, "  ")){
        $line = str_replace("  ", " ", $line);
      list($f1, $apache_user) = explode(" ", $line);
      $apache_user = trim($apache_user);
      $i = $anz_includes;
  # st2xo: $apache_user is nowhere set in this function...
  if(isset($apache_user) && $mod->system->is_user($apache_user)){
    # ... so this never will be returned
    return $apache_user;
  } else {
    # ... and root will be returned in every case
    return "root";
How will be the variable $apache_user set in the function apache_user()?
I think there is a global $apache_user or something like that missing.

Or IŽam completely wrong now?
Reply With Quote