Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4 Couldn't open file

closed
None
5
2012-10-11
2000-11-13
Anonymous
No

Discussion

  • Logged In: NO
    Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

    I successfully installed AWStats at my IIS webserver
    and I launch "awstats.pl" from the command line as
    stated in the "README.TXT". An HTML code page was
    shown on screen and I found a file "awstats112000.txt"
    was created in the directory "c:\inetpub\wwwroot\cgi-
    bin" which is same as "awstats.pl".

    When I accessed the file "awstats.pl" on the browser,
    the following message displayed:

    "Couldn't open file c:\inetpub\wwwroot\cgi-
    bin\awstats112000.tmp.1352: Permission denied."

    Could you tell me what is the problem?

    Regards,
    A. Tsang.

     
  • Logged In: YES
    user_id=96898
    Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Hotbar 2.0)

    OK.
    When you launch awstats from command line, you don't have
    the same rights than when you launch it from your browser.

    The user used to run awstats from your browser is a special
    user defined in your IIS setup, this means the following
    thing :
    Your directory must be a NTFS partition and the permissions
    to write are allowed to the user you use from command line
    but not allowed to the IIS user. You can do this to solve:
    1) Change permissions on your cgi-bin directory to the IIS
    user (or to Everyone if you don't know it).
    OR
    2) Use the 2.23 version and change DirHistory="." into
    DirHistory="C:\awstats_working_dir" where
    C:\awstats_working_dir is a directory where everyone has
    the right to write.
    OR
    3) Use awstats from command line or a scheduler and
    redirect output into a file like this:
    awstats.pl www.monserveur.com >
    c:\inetpub\wwwroot\stats.html (with 2.22)
    awstats.pl -h www.monserveur.com >
    c:\inetpub\wwwroot\stats.html (with 2.23)
    and you can see your stats from your browser with the
    following URL:
    www.monserveur.com/stats.html
    but you loose with this third solution the way to have
    realtime statistics.

    If i'm wrong and you don't have NTFS permissions, i really
    don't know what's happen. It might be a not allowed
    permission to write on cgi-bin in your IIS setup.