Restrict the number of disk space or files that specify the user can have on the server

zhaozj2021-02-17  122

Restrict the specified user can have the number of disk space or files on the site

linuxman

Back to〗 Forward〗

Restricting the specified user's disk space or file number comparison Cool TIPS: By default, Redhat Linux does not have any restrictions. 1. Check your / etc / fstab, assuming that there is no quota file like this. / DEV / HDA1 / EXT2 DEFAULTS 1 1 / DEV / HDA2 / HOME EXT2 Defaults 1 2 / Home is a separate partition. 2. In order to set the disk space occupied by the user jephe under the directory / home / jephe, first change / etc / fstab like this: / dev / hda1 / ext2 defaults 1 1 1 / dev / hda2 / home ext2 defaults, usrquota 1 2 3. Log in to root, create an empty file quota.user #touch /Home/quota.user #Touch 600 /Home/quota.user 4. Restart the server 5. Start the assigned user assignment The number of disk quotas and most stored files. # Edquota -u xxx quota for user xxx / dev / hda2: blocks in use: 0, limited = 5000, hard = 6500) Inodes in Use: 356, Limits (Soft = 1000, HARD = 1500) You only need to change Limits one. You can view a user's disk quota, such as #quencea lemon linuxman@263.net

转载请注明原文地址:https://www.9cbs.com/read-31589.html

New Post(0)