#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    79
    Rep Power
    15
    #!/usr/bin/perl
    use CGI;
    print "Content-Type: text/htmlnn";
    print "test...................<br>";
    $working_dir="/home/httpd/html/webalizer/";
    chdir($working_dir);
    mkdir("html",0755) && chown ("500","100","html");
    #`webalizer -Q /var/log/httpd/access_log`;
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    try the following....


    #!/usr/bin/perl
    use CGI;

    $foo=new CGI;

    print $foo->header;
    print "<html>n";
    print "<body>n";
    print "<b>test</b>...................<br>n";
    $working_dir="/home/httpd/html/webalizer/";
    chdir($working_dir);
    mkdir("html",0755) && chown ("500","100","html");
    #`webalizer -Q /var/log/httpd/access_log`;

    print "</body>n";
    print "</html>n";


    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    79
    Rep Power
    15
    working_dir,system.pl --> uid=500 gid=100
    -------------------------------------------
    #!/usr/bin/perl
    # system.pl
    use CGI;
    $foo=new CGI;
    print $foo->header;
    # -- chdir is ok
    $working_dir="/home/httpd/htdocs/webalizer/";
    chdir($working_dir);
    # -- mkdir no action
    mkdir("html",0755); #-- no action
    chown("500","100","html"); #-- no action

    $temp1="-Q"; # -- first parameter
    $temp2="/var/log/httpd/access_log"; #-- second parameter
    @output=`webalizer $temp1 $temp2`; #-- no action
    # --`cp * *` could be no action
    @output=`webalizer $temp2`;
    print "@output<br>"; #--- output is ok,..but
    # --but no any file created
    # --if I chmod all files to -rw-r--rw(others)-
    # --old files will be updated
    @output=`ls`; #-- output is ok
    print "<P>List files: @output<br>";
    -------------------------------------------
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    79
    Rep Power
    15
    # --if I chmod $working_dir to -rw-r--rw(others)-
    # --no any file created too

IMN logo majestic logo threadwatch logo seochat tools logo