Results 1 to 8 of 8
Thread: Limit user space
Enjoy an ad free experience by logging in. Not a member yet? Register.
Limit user space
How do I limit the space a user can save/store files. Say I want each user just to have 500MB of space. How/where do I define that.
I'm running a Ubuntu 7.10 server, fresh install, with Apache, PHP and MySql.
This is the purpose of quotas and as easy as it getsI am on a journey to mastering Linux and I got a bloody long way to go!!!
Use virtual filesystem with "dd"
example set user1 home folder for 20MB
~$:dd if=/dev/zero of=/home/user1/user1-disk.ext3 count=40960
Add into /etc/fstab
/home/user1/user1-disk.ext3 /home/user1 rw,loop 0 0
mount -o loop=/dev/loop0 /home/user1/user1-disk.ext3 /home/user1
- Copy size larger than 20MB sure you will get error message "no space left"
- run ~$df -m
- run ~$mount
Now we're talking. But what if I have a lot of users? More than 50.
It's easy! go for quota ...
OK, I'll give it a try during the weekend. Thanks a lot.