[BlueOnyx:03552] Re: admin user quota error with ftp
Bret Hughes
bhughes at elevating.com
Tue Feb 9 22:52:19 -05 2010
Chuck Tetlow wrote:
> *---------- Original Message -----------*
> From: Bret Hughes <bhughes at elevating.com>
> To: BlueOnyx General Mailing List <blueonyx at blueonyx.it>
> Sent: Tue, 09 Feb 2010 14:19:50 -0600
> Subject: [BlueOnyx:03539] Re: admin user quota error with ftp
>
> > Michael Stauber wrote:
>> Hi
>> Bret,
>>
>>
>>
>>> 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.
>>>
>>>
>> 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.
>>
>>
>>
> Thanks guys. This is what I have learned so far:
> >
> > 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.
> >
> > 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.
> >
> > There are almost no files there at all
> >
> > [root at jobob site61]# du -sh *
> > 36K logs
> > 4.0K users
> > 40K web
> > 68K webalizer
> > [root at jobob site61]#
> >
> > get_quotas.pl indicates that there is significant disk usage as well:
> >
> > site61 9215864 51200000
> >
> > 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.
> >
> > Argh.
> >
> > Thanks again.
> >
> > Bret
>
>
>
> Bret,
>
> 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.
>
> 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.
>
> Bottom line - the wildcard * doesn't match hidden directories when
> running the disk usage command.
>
>
>
> Chuck
>
>
>
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.
Duh.
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.
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.
Thanks again.
Bret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20100209/4b274847/attachment.html>
More information about the Blueonyx
mailing list