Announcement

Collapse
No announcement yet.

anacron and ftpstats - path problem

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    anacron and ftpstats - path problem

    error msg:

    From patrick@patrick-desktop Fri Aug 10 19:16:01 2007
    Return-Path: <patrick@patrick-desktop>
    Received: from patrick-desktop (patrick@patrick-desktop [127.0.0.1] (may be forged))
    by patrick-desktop (8.14.1/8.14.1/Debian-8ubuntu1) with ESMTP id l7ANG1pN021590
    for <patrick@patrick-desktop>; Fri, 10 Aug 2007 19:16:01 -0400
    Received: (from patrick@localhost)
    by patrick-desktop (8.14.1/8.14.1/Submit) id l7ANG1G1021517
    for patrick; Fri, 10 Aug 2007 19:16:01 -0400
    Date: Fri, 10 Aug 2007 19:16:01 -0400
    Message-Id: <200708102316.l7ANG1G1021517@patrick-desktop>
    From: root@patrick-desktop (Cron Daemon)
    To: patrick@patrick-desktop
    Subject: Cron <patrick@patrick-desktop> ftpstats
    Content-Type: text/plain; charset=ANSI_X3.4-1968
    X-Cron-Env: <SHELL=/bin/sh>
    X-Cron-Env: <HOME=/home/patrick>
    X-Cron-Env: <PATH=/usr/bin:/bin>
    X-Cron-Env: <LOGNAME=patrick>

    /bin/sh: ftpstats: command not found


    root@patrick-desktop:/etc# cat crontab
    # /etc/crontab: system-wide crontab
    # Unlike any other crontab you don't have to run the `crontab'
    # command to install the new version when you edit this file
    # and files in /etc/cron.d. These files also have username fields,
    # that none of the other crontabs do.

    SHELL=/bin/sh
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

    # m h dom mon dow user command
    17 * * * * root cd / && run-parts --report /etc/cron.hourly
    25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
    47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
    52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
    #


    the 'ftpstats' binary lives in /usr/sbin which supposedly is in the path for anacron.
    how do i fix this?
    thanks!

    Scorpaen

    #2
    Re: anacron and ftpstats - path problem

    First of all: make sure anacron is installed (which by Kubuntu default is not the case).

    With that "said", I'd check the location and permissions of ftpstats, e.g. by means of:

    Code:
    which ftpstats
    ls -l [path]/ftpstats
    Further reading (if applicable): http://www.penguin.ch/dokuwiki/doku.php/debian:basics

    Comment


      #3
      Re: anacron and ftpstats - path problem

      hey thanks for the reply.
      ftpstats is located in /usr/sbin.
      anacron is installed and enabled in system services.
      i used kcron to add /usr/sbin to the path and now it runs
      but it does not write to the logfile.
      i just get mail in my mailbox now showing the stats.
      any ideas?

      Comment


        #4
        Re: anacron and ftpstats - path problem

        Originally posted by Scorpaen
        but it does not write to the logfile
        Why should it?

        In other words: how - exactly - are you trying to invoke ftpstats ...?

        Comment


          #5
          Re: anacron and ftpstats - path problem

          i just have anacron running:
          ftpstats
          I can't for the life of me figure out how to get it to write to a log file.
          it did it ONE time, wrote to an html file from gproftpd
          but I can't figure out how.
          here's the man page...

          FTPSTATS(8) FTPSTATS(8)

          NAME
          ftpstats - FTP Log summarizer

          SYNOPSIS
          ftpstats [options]

          DESCRIPTION
          Ftpstats dissects the defined ftp log and reports various statistics as requested. This manual page was written for the Debian GNU/Linux distribution because the
          original program does not have a manual page.

          OPTIONS
          -f filename
          Use filename rather than the default /var/log/xferlog

          -r Include real users.

          -a Include anonymous users.

          -h Include report on hourly traffic.

          -d Include report on domain traffic.

          -t Report on total traffic by section.

          -i Report on incoming traffic only (uploads).

          -o Report on outgoing traffic only (downloads).

          -Ddomain
          Report only on traffic from domain encountered under test and not recognized under com, -D com will give you only stats about com excluding test.com! Use -A
          com for correct results.

          -Aaddress
          Report only on traffic from addresses whose end matches address

          -ldepth
          Depth of path detail for sections

          -ssection
          Section to report on. e.g. -s /pub will report only on paths under /pub

          BUGS
          No known bugs at this time. If you discover any bugs, please report at http://bugs.proftpd.org/ For help/support, try the ProFTPD mailing lists, detailed on
          http://www.proftpd.org/lists.html

          SEE ALSO
          proftpd(8),proftpd.conf(5),xferlog(5)

          AUTHORS
          ProFTPD is written and maintained by a number of people, full credits can be found on http://www.proftpd.org/credits.html

          CREDITS
          This manual page was written by Francesco P. Lovergine <frankie@debian.org> and other Debian developers, for the Debian GNU/Linux system (but may be used by others).
          Please use the most appropriate mailing list listed on http://www.proftpd.org/lists.html for ftpstats related comments.

          Debian GNU/Linux October 30, 2002 FTPSTATS(8)
          ------------------------------------------------------------------------------------------------------



          update:

          I found the config line in GPROFTPD where it gens stats
          I uncommented it

          #gp_random_username_length 6
          #gp_random_password_length 6
          #gp_randomize_case lower
          #gp_useradd_homedir_path /var/ftp
          gp_html_path /var/www/ftp.htm
          #gp_welcome_name welcome.msg


          but when i start it up i get this error


          - Fatal: unknown configuration directive 'gp_html_path' on line 38 of '/etc/proftpd/proftpd.conf'

          Comment


            #6
            Re: anacron and ftpstats - path problem

            Well, based on the man page info, without using the -f option to specify the file you want it to write to, the default log file is /var/log/xferlog. You say that you only have it running as ftpstats (no options). So have you checked /var/log/xferlog to see if it contains data?
            Slava Ukraini! πŸ‡ΊπŸ‡¦
            Windows no longer obstruct my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes​

            Comment


              #7
              Re: anacron and ftpstats - path problem

              something is wrong with my cron entry then...
              i've specified -f and the /var/www/ftp.htm
              but it doesn't write to it.
              any tips for me?
              i used kcron

              Comment


                #8
                Re: anacron and ftpstats - path problem

                I'd be happy to look over what you have. Will you post the cron contents?
                Slava Ukraini! πŸ‡ΊπŸ‡¦
                Windows no longer obstruct my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes​

                Comment


                  #9
                  Re: anacron and ftpstats - path problem

                  ftpstats -r -a -h -d -t -i -o -f /var/www/ftp.htm

                  that's the 'program' entry in kcron
                  i added a path variable, /usr/sbin
                  because that's where 'ftpstats' binary lives.
                  THANKS!

                  Comment


                    #10
                    Re: anacron and ftpstats - path problem

                    Okay. The first thing I would do is to test that the kcron setup works with ftpstats default settings. In this I mean, remove the -f /var/www/ftp.htm and execute the kcron. Check the default /var/log/xferlog for entries. If that is all good, then I would check on the ownership of the /var/www/ftp.htm file you created. You did create that file, yes?
                    Slava Ukraini! πŸ‡ΊπŸ‡¦
                    Windows no longer obstruct my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes​

                    Comment


                      #11
                      Re: anacron and ftpstats - path problem

                      root@patrick-desktop:/var/www# ls -l ftp.htm
                      -rw-r--r-- 1 proftpd ftp 1255 2007-08-01 23:42 ftp.htm

                      nope. xferlog is not being written to by ftpstats when i just run 'ftpstats' in kcron

                      Comment


                        #12
                        Re: anacron and ftpstats - path problem

                        Okay. Re-read the man page for ftpstats. This program doesn't write to anything - it "dissects the defined ftp log and reports various statistics as requested." That means (to me) that the default file /var/log/xferlog (or another designated file) gets written to 'by another process.' So, what FTP client/server/application are you using, and do you have it setup to log it's activities, and to what log file?
                        Slava Ukraini! πŸ‡ΊπŸ‡¦
                        Windows no longer obstruct my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes​

                        Comment

                        Users Viewing This Topic

                        Collapse

                        There are 0 users viewing this topic.

                        Working...
                        X