Quota problem

Discussion in 'Installation/Configuration' started by itti, Oct 8, 2007.

  1. itti

    itti New Member

    I've a problem with the quota management.

    I've an user with 100Mb web space. The statistics page says:
    Storage space: 100 MB
    used: 20.93M

    the same seems to be interpreted by the quota command; repquota -avug

    Block limits File limits
    Group used soft hard grace used soft hard grace
    ----------------------------------------------------------------------
    web39 -- 19376 102400 103424 2185 0 0

    But if the user (web39_info is the site admin user) tries to upload new files, he receives a disk quota exceeded command.

    Can someone wonder why I'm experiencing this ?
    Thank you,
    Massimo
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. itti

    itti New Member

    I tried but ...

    Dear Till,
    I've manually modified the directory permissions so I tried to set TRUE the sudo option in the config file but after an IspConfig server restart I got the same result: if I try to create a directory by FTP I receive the quota exceeded answer.
    Maybe I did something wrong: before setting the new file permission, now to 775, I changed the file owner, setting it to apache:web39 (web39 is the correct user) whereas theres a web39_info user with admin access to the site (the one with which I log in with FTP).
    Did I brake the quota management system for the user in doing so ?

    Thank you,
    Massimo
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You must configure the du command to be run by sudo first. This is described in this thread too.
     
  5. itti

    itti New Member

    du sudoed?

    Dear Till,
    thank you for your answer, but I had already sudoed du with the line

    admispconfig ALL = NOPASSWD: /usr/bin/du *

    at the end of the sudo file (edited with visudo) but nothing changed; I can not add a file or a directory to my site space. I also tried to do a

    su admispconfig
    du /root

    and I received a " Permission denied" error so I think not having correctly configured the sudo command but I don't figure how to circumvent the problem.

    Have you some other hint ?
    Thank you very much,
    Massimo
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

  7. itti

    itti New Member

    I tried but ...

    Thank you Till, you are the fastest "related topic finder" I ever saw.

    I tried also using the more general rule you suggested but nothing happened. I start thinking that the problem is somewhere else. The du command on the web directory for the interested user gives:

    bash-3.1$ du -hs
    18M .
    bash-3.1$ sudo /usr/bin/du -hs
    18M .

    as admispconfig user and

    [[email protected] web]# du -hs
    18M .

    as root, so the incremental count seems to be correct.
    The statistics panel for that domain now states:

    Storage space: 100 MB
    used: 952.36k

    but where are the above mentioned 20Mb gone ? And by the way, where does the quota system (for FTP upload) find an over quota problem ?

    Sorry but I'm a little bit puzzled ...
    Massimo
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig uses the following command when su is enabled:

    sudo du -h --max-depth=1 /var/www/web1

    (replace the webID in the above example with the ID of your website).
     
  9. itti

    itti New Member

    du sudo

    dear Till,
    that is the answer (run as admispconfig):

    du: `/var/www/web39/user/web39_info/Maildir': Permission denied
    120K /var/www/web39/user
    4.0K /var/www/web39/ssl
    1.6M /var/www/web39/log
    18M /var/www/web39/web
    4.0K /var/www/web39/cgi-bin
    4.0K /var/www/web39/phptmp
    20M /var/www/web39

    bash-3.1$ sudo du -h --max-depth=1 /var/www/web39
    124K /var/www/web39/user
    4.0K /var/www/web39/ssl
    1.6M /var/www/web39/log
    18M /var/www/web39/web
    4.0K /var/www/web39/cgi-bin
    4.0K /var/www/web39/phptmp
    20M /var/www/web39

    so the count performed by "sudo du" seems correct (the same as du run by root). The statistics panel for web39 says:

    Storage space: 100 MB
    used: 952.36k

    I'm oriented to think that I did something wrong with users. Actually all files are of user apache and group web39 (I changed it to follow the customer needs) but I have also the user web39_info that owns the site (I access with web39_info using FTP). Did I make some knot ?

    Thank you,
    Massimo
     
  10. itti

    itti New Member

    trying to guess the problem

    I found the problem, but I don't have idea abut where's the error:

    The site group is web39
    The admin user is web39_info
    The web dir has web39_info:web39 owner

    The site has 100Mb quota;
    The above mentioned user has 10Mb quota
    The web directory is more than 10Mb

    The FTP client correctly (I think) does not allow web39_info to add any more files. Have I maybe misunderstood the use of the user quota? Should this be set at 100Mb ? Is'nt this related only to mailbox dimension ?

    Thank you,
    Massimo
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    If a user is the administrator of a website, you should set the quota of this user to the size of the web quota.
     

Share This Page