Linux Quota

Discussion in 'General' started by alexillsley, May 4, 2007.

  1. alexillsley

    alexillsley New Member

    Hi,
    I was just wondering how the linux qouta actually works:confused:

    What happens if a user puts a file bigger than there quota up? Does it remove there write permssions? Does it even let them upload it?

    Thanks,
    Alex
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The quota system denies to save the file. It does not change any permissions.
     
  3. alexillsley

    alexillsley New Member

    So if upload a 20mb file to a site with a 10mb quota, it should fail to upload?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, if the quota is activated for this filesystem and the file is uploaded by the correct user.
     
  5. alexillsley

    alexillsley New Member

    ----- expired ----
     
    Last edited: Nov 15, 2010
  6. alexillsley

    alexillsley New Member

    Having a look it appears that the quota hasnt been set:confused:
    Code:
    server1:~ # quota -g web12
    Disk quotas for group web12 (gid 10012): none
     
  7. mlz

    mlz Member

    Most or all of the perfect setups detail how to setup quota's for your system. Basically you make a small change to your fstab and then turn the quotas on. If I remember correctly your using Suse, I'm sure that's basically all you have to do. Can you post the line out of your fstab with your users file system?
     
  8. alexillsley

    alexillsley New Member

    ----- expired ----
     
    Last edited: Nov 15, 2010
  9. Leszek

    Leszek Member

    SuSE has a quota daemon that can be turned on by this command:
    Code:
    rcquotad start
    I don't know if You should make the quota daemon start automatically when the system boots when ISPConfig is installed.
     
  10. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    repquota -avug
    ?
    Did you get any error messages when you installed quota? Maybe the quota module isn't loaded in the kernel?
     
  11. alexillsley

    alexillsley New Member

    I didnt get any errors:confused:

    Here is the output:

    Code:
    server1:~ # repquota -avug
    *** Report for user quotas on device /dev/md2
    Block grace time: 7days; Inode grace time: 7days
                            Block limits                File limits
    User            used    soft    hard  grace    used  soft  hard  grace
    ----------------------------------------------------------------------
    admispconfig --   48196       0       0           1654     0     0
    beagleindex --   52124       0       0           5338     0     0
    lp        --      24       0       0              3     0     0
    named     --       8       0       0              2     0     0
    news      --       4       0       0              1     0     0
    nobody    --       4       0       0              1     0     0
    root      -- 2755740       0       0         112938     0     0
    uucp      --       4       0       0              1     0     0
    wwwrun    --      16       0       0              4     0     0
    zenoss    --   96964       0       0           5282     0     0
    fphost1_sshuser --       0    1024    2048              0     0     0
    fphost12_ftpusers --       0    1024    2048              0     0     0
    fphost14_ftpuser --       0    1024    2048              0     0     0
    #500      --    5984       0       0            543     0     0
    #501      --   63452       0       0            431     0     0
    #10132    --       4       0       0              3     0     0
    #1000     --   16508       0       0           1673     0     0
    #179      --    2016       0       0            148     0     0
    #1001     --     692       0       0             54     0     0
    #10138    --       0    1024    2048              0     0     0
    #1002     --   60472       0       0           5846     0     0
    #10139    --       0    1024    2048              0     0     0
    #1169     --    4260       0       0            166     0     0
    #10045    --       0    1024    2048              0     0     0
    #1210     --   16412       0       0           3670     0     0
    #10053    --       0    1024    2048              0     0     0
    
    Statistics:
    Total blocks: 12
    Data blocks: 2
    Entries: 26
    Used average: 13.000000
    
    *** Report for user quotas on device /dev/hdd1
    Block grace time: 7days; Inode grace time: 7days
                            Block limits                File limits
    User            used    soft    hard  grace    used  soft  hard  grace
    ----------------------------------------------------------------------
    admispconfig --       0       0       0              1     0     0
    at        --       8       0       0              3     0     0
    beagleindex --   31764       0       0            284     0     0
    games     --       4       0       0              1     0     0
    haldaemon --       4       0       0              1     0     0
    lp        --      16       0       0              4     0     0
    mail      --       4       0       0              1     0     0
    man       --    6904       0       0           1452     0     0
    messagebus --       4       0       0              1     0     0
    mysql     --   22640       0       0            229     0     0
    named     --      16       0       0              4     0     0
    news      --       8       0       0              5     0     0
    nobody    --       4       0       0              1     0     0
    ntp       --       4       0       0              1     0     0
    postfix   --      52       0       0             40     0     0
    root      --  808536       0       0           6959     0     0
    uucp      --       4       0       0              1     0     0
    wwwrun    --      20       0       0              5     0     0
    fphost1_sshuser --       0    1024    2048              0     0     0
    fphost12_ftpusers --       0    1024    2048              0     0     0
    fphost14_ftpuser --       0    1024    2048              0     0     0
    #10138    --       0    1024    2048              0     0     0
    #10139    --       0    1024    2048              0     0     0
    #10045    --       0    1024    2048              0     0     0
    #10053    --       0    1024    2048              0     0     0
    
    Statistics:
    Total blocks: 9
    Data blocks: 2
    Entries: 25
    Used average: 12.500000
    
    *** Report for group quotas on device /dev/md2
    Block grace time: 7days; Inode grace time: 7days
                            Block limits                File limits
    Group           used    soft    hard  grace    used  soft  hard  grace
    ----------------------------------------------------------------------
    root      -- 2847832       0       0         117005     0     0
    sys       --      20       0       0              2     0     0
    tty       --      36       0       0              6     0     0
    disk      --       0       0       0             32     0     0
    lp        --       4       0       0              1     0     0
    www       --      16       0       0              4     0     0
    wheel     --    4676       0       0            395     0     0
    news      --       4       0       0              1     0     0
    uucp      --       4       0       0              9     0     0
    shadow    --     456       0       0             10     0     0
    dialout   --     308       0       0              4     0     0
    audio     --      24       0       0              1     0     0
    cdrom     --      68       0       0              1     0     0
    trusted   --      80       0       0              2     0     0
    man       --      24       0       0              1     0     0
    users     --   41620       0       0           5558     0     0
    nobody    --       4       0       0              1     0     0
    nogroup   --      48       0       0              1     0     0
    maildrop  --      32       0       0              2     0     0
    ntp       --       4       0       0              1     0     0
    named     --      12       0       0              4     0     0
    admispconfig --   68152       0       0           3050     0     0
    web3      --       0  102400  103424              0     0     0
    web12     --       0    4096    5120              0     0     0
    #500      --    5984       0       0            543     0     0
    #501      --   61092       0       0            202     0     0
    #305      --    2016       0       0            148     0     0
    #1000     --    6928       0       0            863     0     0
    #80       --    2292       0       0            228     0     0
    #1002     --   60472       0       0           5846     0     0
    #1169     --    4260       0       0            166     0     0
    #1210     --   16412       0       0           3670     0     0
    #10023    --       0  307200  308224              0     0     0
    #10024    --       4       0       0              1     0     0
    
    Statistics:
    Total blocks: 12
    Data blocks: 2
    Entries: 34
    Used average: 17.000000
    
    *** Report for group quotas on device /dev/hdd1
    Block grace time: 7days; Inode grace time: 7days
                            Block limits                File limits
    Group           used    soft    hard  grace    used  soft  hard  grace
    ----------------------------------------------------------------------
    root      --  808476       0       0           6965     0     0
    daemon    --    5760       0       0           1440     0     0
    tty       --     100       0       0              3     0     0
    lp        --      16       0       0              4     0     0
    www       --       4       0       0              1     0     0
    mail      --       4       0       0              2     0     0
    news      --       8       0       0              5     0     0
    uucp      --       8       0       0              2     0     0
    dialout   --       8       0       0              2     0     0
    games     --       4       0       0              1     0     0
    man       --    1144       0       0             12     0     0
    messagebus --       4       0       0              1     0     0
    haldaemon --       4       0       0              1     0     0
    at        --       8       0       0              3     0     0
    postfix   --       0       0       0             27     0     0
    maildrop  --       8       0       0              2     0     0
    ntp       --       8       0       0              2     0     0
    beagleindex --   31764       0       0            284     0     0
    named     --      24       0       0              7     0     0
    mysql     --   22640       0       0            229     0     0
    web3      --       0  102400  103424              0     0     0
    web12     --       0    4096    5120              0     0     0
    #10023    --       0  307200  308224              0     0     0
    
    Statistics:
    Total blocks: 8
    Data blocks: 2
    Entries: 23
    Used average: 11.500000
    
     
    Last edited: May 5, 2007
  12. falko

    falko Super Moderator Howtoforge Staff

    It's working then. I guess you simply didn't set a quota for the group web12.
     
  13. alexillsley

    alexillsley New Member

    Look at the report above ->
    Code:
    web12     --       0    4096    5120              0     0     0
    i did set it
     
  14. falko

    falko Super Moderator Howtoforge Staff

    Well, then it's ok, I guess. :)
     
  15. alexillsley

    alexillsley New Member

    How did i upload an 8mb file then:confused:
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Upload with PHP? In this case check the php script, if it contains any limits and also the php.ini if the upload and memory limit is high enough.
     
  17. falko

    falko Super Moderator Howtoforge Staff

    If you uploaded the file with PHP, then the file is uploaded under the permissions of the user Apache is running under (unless you use suPHP) and therefore doesn't fall under the quota of your web12... user.
     
  18. alexillsley

    alexillsley New Member

    I uploaded this via smartFTP as user in the group web12:confused:
     

Share This Page