How to setup user quotas ?

Started by Administrator, September 09, 2014, 09:59:48 PM

Previous topic - Next topic

cacedicam

hi
i have quota problem to apply tuto but not work, i have lastest version for cwp
how to fix it ?

devnull


Are you using a VPS server?

You followed http://forum.centos-webpanel.com/centos-configuration/how-to-setup-user-quotas/

See the comment :

>Re: How to setup user quotas ?
>« Reply #8 on: November 23, 2014, 11:43:31 PM »

  >  Quote

>for openvz system you need to contact your hosting provider.




erm3nda

Thank you sir.

My waiting has rewarded me with work done by you.
Just kidding, thank you really :)
8==D it's a function that try to compare 8 (int) against D (string) which returns True or False depending on the asker.

tomidjx

Quote from: Administrator on February 04, 2015, 02:20:12 AM
new version will have quota setup script to do this automatically for you.

I tried the quota setup script, and it seems to work, however, when i logout and login again still get the message that i need to set up quotas..

how do I know quotas are set correctly? in the packages i can set quotas and quotas are showing uo in list packages, however, the warning message about setting up quotas on the dashboard will reappear anytime i login in admin CWP.

any advice will be greatly appreciated.

Administrator

try by checking all users quota

repquota -a -s

tomidjx

Quote from: Administrator on March 24, 2015, 06:14:10 PM
try by checking all users quota

repquota -a -s

I don't get any output from that command, no errors, no messages, it just goes to next line, as [root@myuser]#

what output should i get? cwp let me set up quotas and select/modify  packages when creating an account.
I did "setup disk quotas" in admin panel and get message 
"Quota Configuration file /usr/local/cwp/.conf/quota_part.conf Already Exist!"

however the warning message remain when i do login in admin.

if i try to open quota_part.conf (with nano) there's nothing inside, just "/"

tomidjx

Quote from: tomidjx on March 27, 2015, 03:16:41 PM
Quote from: Administrator on March 24, 2015, 06:14:10 PM
try by checking all users quota

repquota -a -s

I don't get any output from that command, no errors, no messages, it just goes to next line, as [root@myuser]#

what output should i get? cwp let me set up quotas and select/modify  packages when creating an account.
I did "setup disk quotas" in admin panel and get message 
"Quota Configuration file /usr/local/cwp/.conf/quota_part.conf Already Exist!"

however the warning message remain when i do login in admin.

if i try to open quota_part.conf (with nano) there's nothing inside, just "/"

I had a second (and 3rd) look at this 3d, and tried to follow avery clues to fgure out what to do.

1) i tried to yum install quotas and got this output:
Package 1:quota-3.17-21.el6_5.x86_64 already installed and latest version
Nothing to do
2 ) i tried to edit /etc/fstab
and got this output:
# /etc/fstab
# Created by anaconda on Sun Mar  9 13:40:48 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/xvda       /               ext4    noatime,errors=remount-ro       0 1
/dev/xvdb       none            swap    sw                              0 0
tmpfs                   /dev/shm                tmpfs   nodev,nosuid,noexec,mode=1777        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
/proc                    /proc                   proc    defaults        0 0

I'm not sure how i should replace default as indicated by the administrator.
Apparently in the new version it should be all set from the admin panel, and i tried, to no avail so far.

Any useful advice will be very welcome.

brijendrasial

#22
As you dont have a separate partition for /home so you need to add quota for root. Replace noatime,errors=remount-ro with noatime,errors=remount-ro,usrjquota=quota.user,jqfmt=vfsv0

After than run the commands below:
mount -o remount /
quotacheck -avugm
quotaon -avug

Now verify if quota is enabled:
repquota -a

tomidjx

Quote from: BullTen on March 28, 2015, 01:28:30 AM
As you dont have a separate partition for /home so you need to add quota for root. Replace noatime,errors=remount-ro with noatime,errors=remount-ro,usrjquota=quota.user,jqfmt=vfsv0

After than run the commands below:
mount -o remount /
quotacheck -avugm
quotaon -avug

Now verify if quota is enabled:
repquota -a
Thanks a lot for your suggestions. Unfortunately it didn't work, this command "quotacheck -avugm" gave me this output: Cannot stat() mounted device /dev/root: No such file or directory.

I gave up and deleted the whole thing. It's too complicated for me, there are a number of things which didn't work for me..
set up quotas, mod_security configuration, mod_rewrite...Bind not starting..

It's a pity as I really like the panel for what it should be, but I spent about a week trying to figure it out. 
Probably the best way for me would be to have it managed, but then for the cost I'll stick with cPanel, it works like a charm and support nginx with a plugin (and for me nginx it's a priority).

Thanks everyone. I'll check out future development of this panel, in particular I will look at a significant improvement with documentation with regard to configuration, and nginx support.

hopefaith

I just want to clarify.... Im using the latest version, it has this feature but in the root dashboard,
it is still showing a "warning about this feature not set up"... Is this a Bug or what???

Javilonas

Quote from: tomidjx on March 27, 2015, 11:32:11 PM
Quote from: tomidjx on March 27, 2015, 03:16:41 PM
Quote from: Administrator on March 24, 2015, 06:14:10 PM
try by checking all users quota

repquota -a -s

I don't get any output from that command, no errors, no messages, it just goes to next line, as [root@myuser]#

what output should i get? cwp let me set up quotas and select/modify  packages when creating an account.
I did "setup disk quotas" in admin panel and get message 
"Quota Configuration file /usr/local/cwp/.conf/quota_part.conf Already Exist!"

however the warning message remain when i do login in admin.

if i try to open quota_part.conf (with nano) there's nothing inside, just "/"

I had a second (and 3rd) look at this 3d, and tried to follow avery clues to fgure out what to do.

1) i tried to yum install quotas and got this output:
Package 1:quota-3.17-21.el6_5.x86_64 already installed and latest version
Nothing to do
2 ) i tried to edit /etc/fstab
and got this output:
# /etc/fstab
# Created by anaconda on Sun Mar  9 13:40:48 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/xvda       /               ext4    noatime,errors=remount-ro       0 1
/dev/xvdb       none            swap    sw                              0 0
tmpfs                   /dev/shm                tmpfs   nodev,nosuid,noexec,mode=1777        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
/proc                    /proc                   proc    defaults        0 0

I'm not sure how i should replace default as indicated by the administrator.
Apparently in the new version it should be all set from the admin panel, and i tried, to no avail so far.

Any useful advice will be very welcome.

Replace:
Quote/dev/xvda       /               ext4    noatime,errors=remount-ro       0 1

for:
Quote/dev/xvda      /        ext4    noatime,errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0     0       1

Then do not forget:
Quoteln /dev/root /dev/xvda

mount -o remount /
quotacheck -avugm
quotaon -avug

repquota -a

Samekas

Quote from: Administrator on September 09, 2014, 09:59:48 PM
Lets say that your /home partition is in / mount point

install quota on your centos
yum install quota

Edit: /etc/fstab   
vi /etc/fstab 
replace "defaults" with "usrjquota=quota.user,jqfmt=vfsv0" for / mount point

Before: UUID=ac567666-9385-4ef5-885c-80f61ec64647       /       ext3    defaults        1       1
After Replace: UUID=ac567666-9385-4ef5-885c-80f61ec64647       /       ext3    usrjquota=quota.user,jqfmt=vfsv0        1       1

mount -o remount /
quotacheck -avugm
quotaon -avug




If you have /home in /etc/fstab then you will need to edit line matching /home
replace "defaults" with "usrjquota=quota.user,jqfmt=vfsv0" for /home mount point

Before: UUID=ac567666-9385-4ef5-885c-80f61ec64647       /home       ext3    defaults        1       1
After Replace: UUID=ac567666-9385-4ef5-885c-80f61ec64647       /home       ext3    usrjquota=quota.user,jqfmt=vfsv0        1       1

mount -o remount /home
quotacheck -avugm
quotaon -avug


Now you need to add this into the CWP Configuration

mkdir -p /usr/local/cwp/.conf/
echo "/home" > /usr/local/cwp/.conf/quota_part.conf



How to check if quota works ?
repquota -a
This will display you user limits

If you had a previously added users then you will need to update quota for them, you can do that by clicking on each account edit and then saving changes, or you can edit packages and save it for all users.


Hello,

Mine is diferent, I have this:

/dev/md2        /       ext3    errors=remount-ro       0       1
/dev/md3        /var    ext4    defaults,usrquota,grpquota      1       2
/dev/sda4       swap    swap    defaults,usrquota,grpquota      0       0
/dev/sdb4       swap    swap    defaults,usrquota,grpquota      0       0
proc            /proc   proc    defaults,usrquota,grpquota              0       0
sysfs           /sys    sysfs   defaults,usrquota,grpquota              0       0
tmpfs           /dev/shm        tmpfs   defaults,usrquota,grpquota      0       0
devpts          /dev/pts        devpts  defaults,usrquota,grpquota      0       0


What to replace? Thank you in advance!

Igor S.

Hi, try to edit your /etc/fstab file.



You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services

Samekas

Quote from: Igor S. on December 11, 2015, 10:12:11 AM
Hi, try to edit your /etc/fstab file.

I know , but what to change exactly? thanks

pjlarambla

Hi,

Am quite new to all this have just installed CWP 2 days ago setup going quite well accept for these Quotas.

My VPS is open not sure if I got on to the suppliers of this that they would do this for me on my VPS as it is Unmanaged
as this is now 2016 it is a long time since the admin said the following statement and I have the latest install of CWP.
Seems a bit wrong
Statement: new version will have quota setup script to do this automatically for you. has this scrip been isued and if so where can we get it eyes not to good.
Can any one tell me what exactly are these quotas and why are the  needed.if it disk space surely the packages should limit what customers would use.

Many thanks All