Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-27, 07:49:19

Author Topic: Critical bug in quota  (Read 2135 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Critical bug in quota
« on: 2014-11-19, 14:09:57 »
In linuxlib.php change the code to this:

Quote
        $totalinode = (int) (($disk / 100) + 1);

        $perblock = 1;
        $totalblock = $disk / $perblock;

        lxshell_return("setquota", "-u", $username, $totalblock, $totalblock, $totalinode, $totalinode, "-a");
}

This:

Quote
$perblock = getFSBlockSizeInKb();

Will assume the block is 4 kB and ex. instead of 10 GB user will get just 10/4=2,5 GB which is wrong !

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Critical bug in quota
« Reply #1 on: 2014-11-19, 17:49:13 »
setquota use $totalblock instead $disk (aka totalsize) and that why we must  '$totalblock = $disk / $perblock;'
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Critical bug in quota
« Reply #2 on: 2014-11-20, 04:38:12 »
But why we divide to /4 ?

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.053 seconds with 18 queries.

web stats analysis