<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Helvetica, Arial, sans-serif"></font><br>
Chuck Tetlow wrote:
<blockquote cite="mid:20100210023041.M5138@tetlow.net" type="cite">
  <meta content="text/html; charset=iso-8859-1"
 http-equiv="Content-Type">
  <meta content="OPENWEBMAIL" name="GENERATOR">
  <font size="2"><b>---------- Original Message -----------</b>
  <br>
From: Bret Hughes <a class="moz-txt-link-rfc2396E" href="mailto:bhughes@elevating.com"><bhughes@elevating.com></a> <br>
To: BlueOnyx General Mailing List <a class="moz-txt-link-rfc2396E" href="mailto:blueonyx@blueonyx.it"><blueonyx@blueonyx.it></a> <br>
Sent: Tue, 09 Feb 2010 14:19:50 -0600 <br>
Subject: [BlueOnyx:03539] Re: admin user quota error with ftp <br>
  <br>
> Michael Stauber wrote:
  <blockquote type="cite"
 cite="mid:201002092017.40402.mstauber@blueonyx.it">
    <pre wrap="">Hi 
Bret,

  
    </pre>
    <blockquote type="cite">
      <pre wrap="">I am getting a quota exceeded error in /var/log/secure when the 
admin 
user
tries to upload via ftp to a vhost directory.  I can use winscp and the 
ftp
works if I turn off quotas (quotaoff /home ) but the server owner 
maintains
more than half the sites on the box and the developers used the admin 
user
to upload when they were on the old bluequartz box and they would like 
to
keep it that way on this blueonyx one. 

 I cannot find anywhere that the quota is set for the admin 
user.
    
      </pre>
    </blockquote>
    <pre wrap="">Like Chris said: Turning off quota for /home is a bad idea. It breaks all 

kinds of things and has ill side effects. The longer you have it off, the 

worse it'll get and the harder it'll be to ever sort the quota out 
again.

User "admin" has unlimited quota. So he can indeed own as many files and 

consume as much space as you've got 
available.

However: You WILL get over quota warnings if the site you upload to as "admin" 

is running out of quota. This is to make sure that even "admin" cannot 

"overstuff" a site with data. Because if he does, then email to users of that 

site will bounce as the users cannot receive any more mails due to the site 

itself being over 
quota.

So if you get an over quota warning while uploading files as "admin", then the 

correct fix is to go to the site in question in the GUI and to increase that 

sites disk 
quota.

  
    </pre>
  </blockquote>
  <font face="Helvetica, Arial, sans-serif">Thanks guys.  This is what
I
have learned so far:
  <br>
> <br>
> The error I was getting from proftpd in /var/log/secure was not
from
the admin quota but from the site one as Michael suggests.  I turned up
the allowed disk space for the site in question but the real issue is,
I believe, that the usage is miscalculated somehow. <br>
> <br>
> In the GUI and drilling down to the site in question I get a usage
of
8999.87 MB and since the max allowed was 500MB the site was thought to
be in error.  I jacked it way up for now so they can continue to work.
  <br>
> <br>
> There are almost no files there at all
  <br>
> <br>
>  [root@jobob site61]# du -sh *
  <br>
> 36K     logs
  <br>
> 4.0K    users
  <br>
> 40K     web
  <br>
> 68K     webalizer
  <br>
> [root@jobob site61]#
  <br>
> <br>
> get_quotas.pl indicates that there is significant disk usage as
well:
  <br>
> <br>
> site61  9215864 51200000  <br>
> <br>
> I am currently looking at the perl code to see if I can get a grip
on
why the usage is so out of kilter.  I have a sneaking feeling it will
be due to the user being used in so many different places.
  <br>
> <br>
> Argh.
  <br>
> <br>
> Thanks again.
  <br>
> <br>
> Bret
  <br>
  <span style="font-weight: bold;"><br>
  <br>
  <br>
  </span>Bret,
  <br>
  <br>
Don't forget to do a " du -hs .* " when in that site's home directory
(note that period in front of the *).  You can have Gigs and Gigs in
user directories, but a " du -hs * " in the site's home directory only
shows the /users subdirectory, not the /.users.  So all you'll ever get
back is 4.0K.  Check the /.users directory to get a handle on how much
the users have total in their subdirectories.
  <br>
  <br>
By the way - same thing when checking the sites.  If you go to
/home/sites and do a " du -hs * ", you'll get zero for all sites.  But
go to /home/.sites and do the same thing -- you'll get the actual size
that every site is using on the hard drive.  This number SHOULD match
up with the GUI indication of how much drive space a site is using.  If
they're more than a bit different, one of that site's users may have
data elsewhere on the drive.  Or Admin has been storing stuff in the
sites.
  <br>
  <br>
Bottom line - the wildcard * doesn't match hidden directories when
running the disk usage command.
  <br>
  <br>
  <br>
  <br>
Chuck
  <br>
  <span style="font-weight: bold;"><br>
  <br>
  </span></font></font><br>
</blockquote>
<font face="Helvetica, Arial, sans-serif">Thanks Chuck and all that
offered help.  It ended up being a stupid admin trick.  I had unzipped
the humongous tarball of the old site into the /home dir and the gid 
of the site in question ( a new one) was used on the old site.  We had
deleted a bunch of old sites before actually exporting and importing to
the new box.  The old gid was a big honkin site.<br>
<br>
Duh.<br>
<br>
Looking at the code for get_quotas.pl pointed me in the right direction
to start looking at gid issues.  It uses the perl Quota module to find
all files with a gid of whatever the site gid is in the entire
filesystem. in this case the one mounted on /home.<br>
<br>
This will be one of those things that I probably will not forget since
it was so frigging painful from a time standpoint but at least I am
working on an understanding of BO under the covers.<br>
<br>
</font><font face="Helvetica, Arial, sans-serif">Thanks again. <br>
<br>
Bret</font>
</body>
</html>