Hi, my quota doesn't seem to work - I just created a new web with the webspace limit of 100 MB. then I uploaded a file with 95MB and 48 hours laet - only for testing reasons - I uploaded a 10MB also and it worked?! But there should be only 100MB webspace possible??? What's my mistake? O does quota only check the stuff at 4 o'clock in the morning like the traffic stuff too? I'm kind of confused?! Code: Speicherplatz gesamt: 100 MB verbraucht: 105.00M Friendly greetings, LeoLinux
Hi Till, it looks like that....: Code: server1:~# ls -lach /var/www/web4/web/ insgesamt 75M drwxrwxrwx 18 web4_admin web4 4,0K 2007-02-13 23:48 . drwxr-xr-x 8 web4_admin web4 4,0K 2007-02-13 23:46 .. -rw-r--r-- 1 root root 74M 2007-02-13 23:49 70MB.img drwxrwxrwx 9 web4_admin web4 4,0K 2007-02-07 02:13 administrator drwxrwxrwx 2 web4_admin web4 4,0K 2007-02-14 04:01 awstats drwxrwxrwx 2 web4_admin web4 4,0K 2007-02-07 02:13 cache I created the 70MB file with dd with the root account so that my web account was filled up to 95 MB or something like that ... and than I started to upload a 10MB file via FTP and I used the web4 account - the owner of the webspace. But thanks for your response - I understand my mistake now ... I'll test it again and I'll only use the web4 account and FTP for it ;-) with friendly greetings, LeoLinux
Code: server1:~# repquota -avug|grep web4 web4_admin -- 0 0 0 0 0 0 web4_admin -- 20236 0 0 2645 0 0 web4 -- 0 102400 103424 0 0 0 web4 -- 20240 102400 103424 2648 0 0 server1:~# Greetings, Leander
web4_admin doesn't have any quota, and the group web4 uses only 20MB of 100 MB. Are you sure your test files are owned by the correct owner and group?
Hi again, ok I checked it out again - and disk quota works .... BUT why on 106MB if I told it to stop on 100MB? Code: server1:~# repquota -avug|grep web4 web4_admin -- 0 0 0 0 0 0 web4_admin -- 103420 0 0 2677 0 0 web4 -- 0 102400 103424 0 0 0 web4 +- 103424 102400 103424 6days 2680 0 0 Thx! ;-) Leander
Please check the log directory of that web site. The logs are written to that directory by root before they're chowned, so it's possible that the quota gets exceeded. You can delete old log files if you don't need them anymore.
there is nothing logged about quota in /web or /web/user antother problem I have is that if traffic for a site is exceeded the site is not reachable anymore - which is ok...but if I just rate it up from maybe 50MB Traffic to 500MB the site is still disabled. The question now..: do I have to wait until the end of the month until it will be accessable again? Thanks, Leo
The log files are in /var/www/web1/log, etc. They are the Apache access logs and error logs, so there's nothing about quota in them. There's a cron job running once per night that takes care about traffic limits. It should unblock the site.
no in those logs was nothing written about quota .... ;-/ I know - I also thought it would we ready after 4o'clock again - but it's still down ... ;-/ That's the error message copied which I just copied out of my browser: Code: Forbidden You don't have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. ^^This was the message when my traffic exceeded for this site ... so I just setted it up to 500 MB and it's still down since a few days ago ... all the other sites are running great. Do you know where to enable this site again without damaging rights and configs ;-) ? Thanks! Leander
What I meant to say was - you can delete the Apache access logs and error logs so that you are within quota again. I've just had a look at the /root/ispconfig/scripts/shell/traffic.php script - it unblocks sites only when a new month has begun. But you can get your site working again by modifying this code near the beginning of the file: PHP: // Monatsanfang: gesperrte Webseiten zurücksetzen if(date("m/Y", (time() - 86400)) != $month){ if($suspended_webs = $mod->db->queryAllRecords("SELECT * FROM isp_isp_web WHERE web_traffic_status = '2'")){ foreach($suspended_webs as $suspended_web){ if($admin_user = $mod->db->queryOneRecord("SELECT isp_isp_user.user_username FROM isp_nodes, isp_dep, isp_isp_user WHERE isp_dep.parent_doc_id = '".$suspended_web['doc_id']."' AND isp_dep.parent_doctype_id = '".$web_doctype_id."' AND isp_dep.child_doc_id = isp_isp_user.doc_id AND isp_dep.child_doctype_id = '".$user_doctype_id."' AND isp_isp_user.user_admin = '1' AND isp_nodes.doc_id = isp_isp_user.doc_id AND isp_nodes.doctype_id = '".$user_doctype_id."' AND isp_nodes.status = '1'")){ $admin_user = $admin_user['user_username']; } else { $admin_user = $isp_web->apache_user; } exec("chown ".$admin_user." ".$webroot."/web".$suspended_web['doc_id']." &> /dev/null"); exec("chmod 755 ".$webroot."/web".$suspended_web['doc_id']." &> /dev/null"); $mod->db->query("UPDATE isp_isp_web SET web_traffic_status = '1' WHERE doc_id = '".$suspended_web['doc_id']."'"); } } }
Ok - that was exactly what I guessed. So what kind of logs do I have to delete because I don't want to kill the other traffic rules for my other web costumers. Thanks for your help! Leander
The logs are in /var/www/web[no]/log. But please delete only old log files, not the ones from the current month (because these are still in use).