HostedDB - Dedicated UNIX Servers

Securing-Optimizing-RH-Linux-1_2_220
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca © Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ® 220 · To enable group quota support on a file system, edit your fstab file (vi /etc/fstab) and add "grpquota" to the fourth field after the word "defaults" or any other options you may have set for this specific file system. As an example change: /dev/sda6               /home                   ext2    defaults        1 2 (as an example: the word “defaults”) /dev/sda6               /home                   ext2    nosuid,nodev    1 2 (as an example: any other options you have set) To read: /dev/sda6               /home                   ext2    defaults,grpquota       1 2 /dev/sda6               /home                   ext2    nosuid,nodev,grpquota   1 2 Possibility 3: · To enable both users quota and group quota support on a file system, edit your fstab file (vi /etc/fstab) and add "usrquota,grpquota" to the fourth field after the word "defaults" or any other options you may have set for this specific file system. Change: /dev/sda6               /home                   ext2    defaults        1 2 (as an example: the word “defaults”) /dev/sda6               /home                   ext2    nosuid,nodev    1 2 (as an example: any other options you have set) To read: /dev/sda6               /home                   ext2    defaults,usrquota,grpquota       1 2 /dev/sda6               /home                   ext2    nosuid,nodev,usrquota,grpquota   1 2 Creation of the "quota.user" and "quota.group" files After the modification of your “/etc/fstab” file, in order for quotas to be established on a file system, the root directory of the file system (i.e. /home in our example) must contain a file, owned by root, called “quota.user” if you want to use user quota, “quota.group” if you want to use group quota or the both if you want to use users and group quota. Step 1 · To create the “quota.user” and/or “quota.group” files, as “root” go to the root of the partition you wish to enable quota (i.e. /home), then create “quota.user” and/or “quota.group” by doing: [root@deep /]# touch /home/quota.user   [root@deep /]# touch /home/quota.group   [root@deep /]# chmod 600 /home/quota.user   [root@deep /]# chmod 600 /home/quota.group The “touch” command will create new empty files under the “home” directory named “quota.user” and “quota.group”. The “chmod” command will set the mode of these files to be read-write only by the super-user “root”. NOTE: Both quota record files, “quota.user” and “quota.group”, should be owned by root, and read-write permission for “root” and none for anybody else.