Re: Awstats Cron job not executing



On Mon, Oct 26, 2009 at 07:08:04PM -0700, Kushal Koolwal wrote:

<20091027012939.GA19189@xxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0


Try becoming the www-data user and trying the above

line from the command line directly? perhaps you'll get some helpful

output.

Actually I did intended to send the output of the above in my original mail=
but I forgot. Here is the output:
debian:~# sudo -u www-data /usr/bin/perl /usr/lib/cgi-bin/awstats.pl -updat=
e -config=3Dmydomain

Create/Update database for config "/etc/awstats/awstats.mydomain.conf" by A=
WStats version 6.7 (build 1.892)
From data in log file "/var/log/apache2/access.log"...
Error: Couldn't open server log file "/var/log/apache2/access.log" : Permis=
sion denied

what are the permissions on /var/log/apache2?

Setup ('/etc/awstats/awstats.mydoamin.conf' file=2C web server or permissio=
ns) may be wrong.
Check config file=2C permissions and AWStats documentation (in 'docs' direc=
tory).
debian:~#=20

Not sure where else I need to give permission to www-data. As noted in my p=
revious mail=2C access.log already has "read" permission. Also I checked "a=
wstats.mydomain.conf" but did not find anything related to www-data and cro=
n jobs.

not sure what else to suggest. On my machines access.log has
permissions

-rw-r---- root adm

so to read the logs chmod o+r or access them from the adm group.

sorry, I've got nothing else to suggest.

A

Attachment: signature.asc
Description: Digital signature



Relevant Pages

  • Re: how to restrict developers in /var/www/html directory...??
    ... The permissions on the directory should look like this when you perform an "ls -la". ... This will allow the webserver to read the files for display, but will only allow the owner to modify them. ... The "www-data" user as I understand it, exists primarily as a safeguard to protect the rest of the system against hacking. ... IMHO it should never be, because if write permissions are accidentally set for www-data (even system administrators make mistakes) that gives someone who breaches the Apache webserver security or the www-data group the ability to rewrite your website files. ...
    (Debian-User)
  • Re: cannot execute img src in localhost
    ... On my Ubuntu server, the web user is www-data, ... A password of "x" means an encrypted password is stored in another file. ... something is wrong so permissions do need to be checked. ...
    (alt.html)
  • RE: Awstats Cron job not executing
    ... WStats version 6.7 ... permissions and AWStats documentation (in 'docs' direc= ... Not sure where else I need to give permission to www-data. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: exec() doesnt work on C/C++ executables
    ... >scriptname> from linux shell prompt. ... Sounds like there might be some permissions wrong somewhere. ... try 'su www-data' (replace www-data with the correct user ...
    (comp.lang.php)