Discussion Locked

quota

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

how i can set quota fro my each users.
and i want to create one users name chmod or something which can do only chmod of any file so no need to give my passwd (root) passwd to all my users.
i do not want to install sudo.

5 replies

by jack

first install quota software. if using redhat
rpm -ivh quota-version.i386.rpm
Decide which partitions you want to set quota. Typically, it's /home and webspace.
Edit /etc/fstab. Example:

/dev/sda /home ext2 defaults 1 2

to

/dev/sda /homeext2 defaults,usrquota 1 2

then modify /etc/rc.d/rc.local

# Check quota and then turn quota on.
if [-x /sbin/quotacheck ]; then
/sbin/quotacheck -avug
fi
if [ -x /sbin/quotaon]; then
/sbin/quotaon -avug
fi

create quota files:
touch /home/quota.user
Make sure files have read/write permission only for the root.
Reboot.

Assign disk quota for user.
using your editor

edquota -u username

example:
Quotas for user username:
/dev/sda5:blocks in use: 0, limits (soft=0,hard=0) inodes in use: 0, limits (soft=0, hard=0)

change 0 to whatever limits you want for the user (hard and soft). blocks is disk space. inodes is files/directory.

Jack

by rangers fan

The easiest way to ad dquotas especially if you are using RedHat 6.x and 7.0 is to use linuxconf. Just make sure the quota software is installed and then use linuxconf to add quota support to the partition, and set the defaults on files and size. Then go to each user account within Linuxconf and set the quotas for each user.

This discussion is closed to new replies.