perlperl
asked on
quota
Here's my /etc/fstab file
/dev/mapper/fedora-root / ext4 defaults,usrquota,grpquota 1 1
I ran
1. mount -o remount /
2. quotacheck -cug /
3.quotaon /
4.edquota root
5. quota root shows
Disk quotas for user root (uid 0):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/fedora-root
4538640* 1 1 7days 123318 0 0
dd if=/dev/urandom of=/test.txt bs=32768 count=279
It succeded in creating this file. I thought this should have failed with disk quota exceede ??
/dev/mapper/fedora-root / ext4 defaults,usrquota,grpquota
I ran
1. mount -o remount /
2. quotacheck -cug /
3.quotaon /
4.edquota root
5. quota root shows
Disk quotas for user root (uid 0):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/fedora-root
4538640* 1 1 7days 123318 0 0
dd if=/dev/urandom of=/test.txt bs=32768 count=279
It succeded in creating this file. I thought this should have failed with disk quota exceede ??
ASKER
I created a user test
[root@localhost ~]# quota test
Disk quotas for user test (uid 17073):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/fedora-root
28* 10 10 6days 9 0 0
[root@localhost ~]# su test
[test@localhost root]$
Added test to sudoers file
[test@localhost root]$ sudo dd if=/dev/urandom of=/root/test.txt bs=32768 count=169
169+0 records in
169+0 records out
5537792 bytes (5.5 MB) copied, 0.487241 s, 11.4 MB/s
SHOULDN"T the above fail? Not sure what I am missing??
/etc/fstab has
/dev/mapper/fedora-root / ext4 defaults,usrquota,grpquota 1
[root@localhost ~]# quota test
Disk quotas for user test (uid 17073):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/fedora-root
28* 10 10 6days 9 0 0
[root@localhost ~]# su test
[test@localhost root]$
Added test to sudoers file
[test@localhost root]$ sudo dd if=/dev/urandom of=/root/test.txt bs=32768 count=169
169+0 records in
169+0 records out
5537792 bytes (5.5 MB) copied, 0.487241 s, 11.4 MB/s
SHOULDN"T the above fail? Not sure what I am missing??
/etc/fstab has
/dev/mapper/fedora-root / ext4 defaults,usrquota,grpquota
ASKER
Do I have to create seperate partition for home? How can I do that?
If /home is part of the same partition or in this case logical volume then no
Quotas are only able to restrict by Filesystem
Quotas are only able to restrict by Filesystem
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was suppose to write in /home/test/test.txt and now it worked .
It properly fails with quota exceeded
It properly fails with quota exceeded
ASKER
this worked
dd if=/dev/urandom of=/home/test/test.txt bs=32768 count=169
THis is because "test" is the user
dd if=/dev/urandom of=/home/test/test.txt bs=32768 count=169
THis is because "test" is the user
you have quota allocation per user and per group. test user is the one you setup with edquota username
edquota -g group see what options it lets you set here.
Note it is very dangerous to set a group quota where there are multiple users as that will enforced based on their combined space usage.
root may have one restriction, but the group other has none so at some point the group quota for other allows for root to have additional space beyond its own.
edquota -g group see what options it lets you set here.
Note it is very dangerous to set a group quota where there are multiple users as that will enforced based on their combined space usage.
root may have one restriction, but the group other has none so at some point the group quota for other allows for root to have additional space beyond its own.
using root as the test account is not adviseable nor is it advisable to set quota on / versus creating a separate partition for /home
the other issue is you have two quota enforcement mechanisms: quota and grpquota.
root:other the group might extend roots quota.
create a new non admin user set their quota making sure it is a hard restriction.
then test the enforcement.