Loading ...
Sorry, an error occurred while loading the content.

Re: webalizer question (self-moving directories)

Expand Messages
  • enventa2000
    ... webalizer at all but that is where the problem seems to be comming from. every week or so, one of my hostees stats directory gets renamed from stats/ to
    Message 1 of 3 , May 18, 2004
    • 0 Attachment
      --- In webalizer@yahoogroups.com, "t_stangel@y..." <t_stangel@y...>
      wrote:
      > hey there,
      > i have a very unusual problem with webalizer. well im not sure its
      webalizer at all but that is where the problem seems to be comming
      from. every week or so, one of my hostees stats directory gets renamed
      from "stats/" to "etc/". then the cron daemon goes nuts and emails me
      about it. it only gets more confusing when the stats directory is
      still there but its empty.
      >
      > each one of my hostees have separate logs so i have a simple perl
      script which processes them all every hour in the cron.hourly
      directory. the system is redhat 8 and it has only happened to one
      hostee. thanks for the help in advance!


      You perhaps have some script in cron.weekly which is moving that
      directory? Could you copy/paste the cron email text and a "ls -ld" and
      a "ls -l" of both directories right after the problem appears, just to
      check ownerships and timestamps? Also the crontab line for cron.
      weekly, and a "ls" of /etc/cron.weekly to check if the directories
      were created around the time a particular script is running.

      In any case, you may use a very ugly "patch" to solve the problem by
      adding these lines in the webalizer script before running webalizer.
      (ejem, I just remembered that you use perl, not bash, just translate
      adequately to perl)

      PROBLEMATIC_DIR="/hostee/stats/directory/"
      mkdir $PROBLEMATIC_DIR/stats/
      cp -rf $PROBLEMATIC_DIR/etc/* $PROBLEMATIC_DIR/stats/

      This will copy all files in "etc/" to "stats/". Notice that files in
      "stats/" holding the same name as some other file in "etc/" will get
      overwritten.

      NOTE: Notice that "dir/etc" is the same as "dir//etc". I just add "/"
      to end of all paths just to be sure that I don't forget later to add
      it, so I get many times paths like "/home//user//stats/dir". It will
      (in my system) work with no problems.
    • t_stangel@yahoo.com
      ah okay. i thought about doing that in perl with a if statement but i am just so baffled at why it might be doing this. i will post all of that once it happens
      Message 2 of 3 , May 18, 2004
      • 0 Attachment

        ah okay. i thought about doing that in perl with a if statement but i am just so baffled at why it might be doing this. i will post all of that once it happens again. thanks!

        -todd


        Do you Yahoo!?
        SBC Yahoo! - Internet access at a great low price.
      Your message has been successfully submitted and would be delivered to recipients shortly.