1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Logging

Discussion in 'Plesk for Linux - 8.x and Older' started by thunder@, Jul 3, 2005.

  1. thunder@

    thunder@ Guest

    0
     
    I still cant get Plesk to work properly, ever since it deceided to go through and chmod all the folders, Logging and statistics have been 100% unfucntional.

    When I go to the logs section I get:

    LogFilesList->init() failed: filemng failed: filemng: stat failed: Permission denied

    --------------------------------------------------------------------------------

    0: /usr/local/psa/admin/htdocs/domains/logs/log_files.php:108 psaerror(string "LogFilesList->init() failed: filemng failed: filemng: stat failed: Permission denied")

    can someone give me the CHMOD and CHOWN values of /usr/local/psa/admin/htdocs/domains/logs/log_files.php and its directory?

    Also, our bandwidth monitoring doesnt work! All sites read 0.00 MB/Month, thats just great....

    I have no options, seeing as you must pay for Plesk support, even though you paid for this 'panel'. Not very happy ATM, seeing as cPanel gave us zero problems. Thanks,
    John
     
  2. thunder@

    thunder@ Guest

    0
     
    Finally solved it, thanks to a member heres post, dirty, fixed my problem:

    Thread: http://forum.plesk.com/showthread.php?s=&threadid=17476

    Now all I have to ask is how did that 'change' no one on the server did it, it was done when all the permissions changed to no access.
     
  3. thunder@

    thunder@ Guest

    0
     
    Well it worked to the point I could view the logs, but once I click a log, I get:
    0: /usr/local/psa/admin/htdocs/domains/logs/log_file_viewer.php:75 psaerror(string "gzopen failed: failed to open stream: Permission denied")
     
  4. thunder@

    thunder@ Guest

    0
     
    It looks like the vhosts/domain.com/statistics was chowned/chmoded incorrectly, they all work now, I jsut dont see how these all changed?
     
  5. thunder@

    thunder@ Guest

    0
     
    Argh Piece of **** software...Bandwidth is still not tracking. Someone please respond, this is bullshit.
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
    I am assuming you have searched all your server logs and found no errors related to why stats are not working...

    Can't say as to how or why it happened, I have read posts regarding the Backup Utils sometimes causing weird things to happen.

    Are you sure your folders & files are chowned/chmodded properly? Mine shows:

    dr-xr-x--- 7 root psaserv 4096 Apr 27 13:37 statistics

    [statistics folder]
    drwxr-xr-x 2 root root 4096 Apr 27 13:37 anon_ftpstat
    drwxr-xr-x 2 root root 4096 Apr 28 04:07 ftpstat
    drwxr-xr-x 2 root root 4096 Apr 28 04:07 logs
    drwxr-xr-x 2 root root 4096 Jul 1 04:07 webstat
    drwxr-xr-x 2 root root 4096 Jul 1 04:07 webstat-ssl

    [webstat folder]
    drwxr-xr-x 2 root root 4096 Jul 1 04:07 .
    dr-xr-x--- 7 root psaserv 4096 Apr 27 13:37 ..
    -rw-r--r-- 1 root root 2492 May 1 04:07 ctry_usage_200504.png
    -rw-r--r-- 1 root root 3368 Jun 1 04:07 ctry_usage_200505.png
    -rw-r--r-- 1 root root 2792 Jul 1 04:07 ctry_usage_200506.png
    -rw-r--r-- 1 root root 3050 Jul 5 04:07 ctry_usage_200507.png
    -rw-r--r-- 1 root root 2747 May 1 04:07 daily_usage_200504.png
    -rw-r--r-- 1 root root 3416 Jun 1 04:07 daily_usage_200505.png
    -rw-r--r-- 1 root root 3150 Jul 1 04:07 daily_usage_200506.png
    -rw-r--r-- 1 root root 2761 Jul 5 04:07 daily_usage_200507.png
    -rw-r--r-- 1 root root 1918 May 1 04:07 hourly_usage_200504.png
    -rw-r--r-- 1 root root 2044 Jun 1 04:07 hourly_usage_200505.png
    -rw-r--r-- 1 root root 1941 Jul 1 04:07 hourly_usage_200506.png
    -rw-r--r-- 1 root root 1850 Jul 5 04:07 hourly_usage_200507.png
    -rwxr-xr-x 1 root psaserv 5415 Jul 5 04:07 index.html
    -rw-r--r-- 1 root root 78579 May 1 04:07 usage_200504.html
    -rw-r--r-- 1 root root 97703 Jun 1 04:07 usage_200505.html
    -rw-r--r-- 1 root root 114165 Jul 1 04:07 usage_200506.html
    -rw-r--r-- 1 root root 58084 Jul 5 04:07 usage_200507.html
    -rw-r--r-- 1 root root 2458 Jul 5 04:07 usage.png
    -rw-r--r-- 1 root root 2685 Jul 5 04:07 webalizer.current
    -rw-r--r-- 1 root root 145 Jul 5 04:07 webalizer.hist

    [logs folder]
    drwxr-xr-x 2 root root 4096 Apr 28 04:07 .
    dr-xr-x--- 7 root psaserv 4096 Apr 27 13:37 ..
    -rw-r--r-- 1 root root 904 Jul 5 12:03 access_log
    -rw-r--r-- 1 root root 1276500 Jul 5 04:07 access_log.processed
    -rw-r--r-- 1 root root 0 Jul 5 04:07 access_ssl_log
    -rw-r--r-- 1 root root 7675923 Jul 5 04:07 access_ssl_log.processed
    -rw-r--r-- 1 root root 146148 Jul 5 12:03 error_log
    -rw-r--r-- 1 root root 364555 Jul 5 18:28 error_ssl_log
    -rw-r--r-- 1 root root 0 Jul 5 04:07 xferlog_regular
    -rw-r--r-- 1 root root 329 Apr 28 04:07 xferlog_regular.processed

    and /var/log/bandwidth:

    -rw------- 1 root root 21730 Jul 5 21:37 bandwidth

    I won't go on. Just wanted to be clear on the perms/ownership.

    And you have done rootkit scans, checked your /tmp, /var/tmp, etc (assumed so).

    I know you are not a newbie, but your posts don't say.
     
  7. thunder@

    thunder@ Guest

    0
     
    Thanks for the permissions list, ill go check now.
     
  8. thunder@

    thunder@ Guest

    0
     
    dr-xr-x--- 7 root psaserv 4096 May 11 03:04 statistics

    [root@216 statistics]# ls -l
    total 20
    drwxr-xr-x 2 root root 4096 May 11 03:04 anon_ftpstat
    drwxr-xr-x 2 root root 4096 May 11 06:07 ftpstat
    drwxr-xr-x 2 root root 4096 May 18 06:08 logs
    drwxr-xr-x 2 root root 4096 May 11 06:07 webstat
    drwxr-xr-x 2 root root 4096 May 11 03:04 webstat-ssl


    [root@21-42 webstat]# ls -l
    total 760
    -rw-r--r-- 1 root root 3854 May 18 06:07 ctry_usage_200505.png
    -rw-r--r-- 1 root root 3173 May 18 06:07 daily_usage_200505.png
    -rw-r--r-- 1 root root 2183 May 18 06:07 hourly_usage_200505.png
    -rwxr-xr-x 1 root psaserv 3770 May 18 06:07 index.html
    -rw-r--r-- 1 root root 117841 May 18 06:07 usage_200505.html
    -rw-r--r-- 1 root root 2299 May 18 06:07 usage.png
    -rw-r--r-- 1 root root 624591 May 18 06:07 webalizer.current
    -rw-r--r-- 1 root root 50 May 18 06:07 webalizer.hist

    [root@216 logs]# ls -l
    total 270380
    -rw-r--r-- 1 root root 260321537 Jul 5 23:48 access_log
    -rw-r--r-- 1 root root 359501 May 18 06:08 access_log.processed.1.gz
    -rw-r--r-- 1 root root 422714 May 17 06:08 access_log.processed.2.gz
    -rw-r--r-- 1 root root 13306116 Jul 5 23:45 error_log
    -rw-r--r-- 1 root root 25658 May 18 06:08 error_log.1.gz
    -rw-r--r-- 1 root root 72630 May 17 06:08 error_log.2.gz
    -rw-r--r-- 1 root root 2030233 Jul 4 02:18 xferlog_regular
    -rw-r--r-- 1 root root 10058 May 18 06:08 xferlog_regular.processed.1.gz
    -rw-r--r-- 1 root root 3066 May 17 06:08 xferlog_regular.processed.2.gz

    All look the same except the fact my webalizer has like half the files, car folders are empty, ill check the logs one last time, thanks for the perm. settings again..
    I dont have the badnwidth one. Not sure how I go about scanning for the rootkits either (on this box at least).
     
  9. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Scanning for rootkits should be the same as on any other Linux box. Download and install the latest versions of rkhunter and chkrootkit, look for any funny files in /tmp, /var/tmp, etc.

    I had also edited my earlier post to include:

    and /var/log/bandwidth:

    -rw------- 1 root root 21730 Jul 5 21:37 bandwidth
     
  10. thunder@

    thunder@ Guest

    0
     
    I meant via windows lol, I didnt know of the linux software, thanks, ill run that now. THis is only my second linux box so I am a newbie...
     
  11. thunder@

    thunder@ Guest

    0
     
    there is no 'bandwidth' in my logs dir, or anywhere on the system for that matter:

    locate bandwidth
    /lib/modules/2.6.8-1.521smp/build/include/config/usb/bandwidth.h
    /lib/modules/2.6.8-1.521/build/include/config/usb/bandwidth.h
    /lib/modules/2.6.5-1.358smp/build/include/config/usb/bandwidth.h
    /lib/modules/2.6.5-1.358/build/include/config/usb/bandwidth.h
    /usr/include/boost/graph/bandwidth.hpp

    And my system is not root'd :)

    IWhat about the user webalizer, I notice looking in var/www/ that the stats folder is perm'd like this:

    drwxr-xr-x 2 root root 4096 Nov 12 2004 cgi-bin
    drwxr-xr-x 3 root root 4096 Feb 10 12:34 error
    drwxr-xr-x 2 root root 4096 May 12 23:13 html
    drwxr-xr-x 3 root root 4096 Feb 10 12:33 icons
    drwxr-xr-x 3 root root 4096 Feb 10 12:29 manual
    drwxr-xr-x 2 root root 4096 Feb 10 12:30 mrtg
    drwxr-xr-x 2 webalizer root 4096 Jul 1 04:03 usage


    and i see MRTG, which I know is bandwidth monitioring, but anyway, what groups does webalizer have to be a member of? I knwo i had to add psaadm to a group, maybe i need to do the same with webalizer?
     
  12. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Ah, your comment about cPanel led me to believe otherwise, still no problem.

    Good to hear you're not rooted. Bad news is somehow I messed up my own test server. The Server Log screen shows all files properly, but now I click and it just redraws the screen.

    Now I just have to figure out what I did and undo it... :D I was trying different things to see if I could replicate your situation.... now I have a slightly different one. And no errors in any of the logs! I just have to laugh....

    Edit: I guess I just broke the logview.php, I can actually see all the other domain stats, reports, etc. Just can't click to show the logs.

    I'm too tired to deal with this further tonight. (Still laughing....)
     
  13. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Ok, this is really strange, but I solved my logview problem.

    Had to rename /usr/local/psa/admin/bin/filemng, then rename it back, and the problem went away.

    God how I hate strangeness. This should have had ZERO effect on perms or ownership (ls -al shows exact same before and after), but for whatever reason, now I can view the domain's log files.....

    And by the way, filemng is a symlink pointing to /usr/local/psa/admin/sbin/wrapper (which was not touched at all)

    As to your question about webalizer user, my test server shows webalizer belongs only to group webalizer.

    My /var/www folder does not have a /stats folder within it. I do have /var/www/html/mrtg/ which is:

    drwxr-xr-x 2 root root 4096 Nov 10 2004 .
    drwxr-xr-x 4 root root 4096 Nov 17 2004 ..
    -rw-r--r-- 1 root root 53173 Feb 7 2003 cfgmaker.html
    -rw-r--r-- 1 root root 3323 Feb 7 2003 contrib.html
    -rw-r--r-- 1 root root 6161 Feb 7 2003 faq.html
    -rw-r--r-- 1 root root 4342 Feb 7 2003 forum.html
    -rw-r--r-- 1 root root 18743 Feb 7 2003 index.html
    -rw-r--r-- 1 root root 7348 Feb 7 2003 indexmaker.html
    -rw-r--r-- 1 root root 4053 Feb 7 2003 logfile.html
    -rw-r--r-- 1 root root 7708 Feb 7 2003 mibhelp.html
    -rw-r--r-- 1 root root 7060 Feb 7 2003 mrtg.html
    -rw-r--r-- 1 root root 343 Feb 7 2003 mrtg-l.gif
    -rw-r--r-- 1 root root 9593 Feb 7 2003 mrtglib.html
    -rw-r--r-- 1 root root 538 Feb 7 2003 mrtg-l.png
    -rw-r--r-- 1 root root 1144 Feb 7 2003 mrtg-m.gif
    -rw-r--r-- 1 root root 414 Feb 7 2003 mrtg-m.png
    -rw-r--r-- 1 root root 1779 Feb 7 2003 mrtg-r.gif
    -rw-r--r-- 1 root root 1759 Feb 7 2003 mrtg-r.png
    -rw-r--r-- 1 root root 4975 Feb 7 2003 mrtg-rrd.html
    -rw-r--r-- 1 root root 4696 Feb 7 2003 mrtg-ti.gif
    -rw-r--r-- 1 root root 4293 Feb 7 2003 mrtg-ti.png
    -rw-r--r-- 1 root root 13698 Feb 7 2003 nt-guide.html
    -rw-r--r-- 1 root root 54064 Feb 7 2003 reference.html
    -rw-r--r-- 1 root root 340 Feb 7 2003 squid.html
    -rw-r--r-- 1 root root 11971 Feb 7 2003 unix-guide.html
    -rw-r--r-- 1 root root 2670 Feb 7 2003 webserver.html
     
  14. thunder@

    thunder@ Guest

    0
     
    My mistake, yes thats correct. and my dir looks like your and here is the parent www dir:

    Here is my WWW:
    www]# ls -al
    total 40
    drwxr-xr-x 9 root root 4096 Feb 10 12:30 .
    drwxr-xr-x 23 root root 4096 Feb 10 12:33 ..
    drwxr-xr-x 2 root root 4096 Nov 12 2004 cgi-bin
    drwxr-xr-x 3 root root 4096 Feb 10 12:34 error
    drwxr-xr-x 2 root root 4096 May 12 23:13 html
    drwxr-xr-x 3 root root 4096 Feb 10 12:33 icons
    drwxr-xr-x 3 root root 4096 Feb 10 12:29 manual
    drwxr-xr-x 2 root root 4096 Feb 10 12:30 mrtg
    drwxr-xr-x 2 webalizer root 4096 Jul 1 04:03 usage
     
  15. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Mine shows the same, except I don't have:

    drwxr-xr-x 2 root root 4096 Feb 10 12:30 mrtg
    drwxr-xr-x 2 webalizer root 4096 Jul 1 04:03 usage

    in the www folder.

    I am at a loss for further advice on what else to check. It was by random chance that I found the strange fix for my logview issue (I still don't understand how just renaming filemng back and forth would cause it to start working).
     
  16. thunder@

    thunder@ Guest

    0
     
    oh well, i renamed it just for the heck of it :cool: and rebooted, server hasnt been rebooted in many moons, thanks for all the sugguestions and your time, ill figure it out eventually.
     
Loading...