Date: Mon, 30 Sep 2002 07:18:29 +0300 From: "Giorgos Keramidas" <keramida@FreeBSD.org> To: "Marc G. Fournier" <scrappy@hub.org>, <freebsd-questions@FreeBSD.org> Subject: Re: Per directory disk quotas ... Message-ID: <002101c26838$78ec3b00$5bd7cdd4@LocalHost> References: <20020929231438.W69855-100000@hub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message -----=20 From: "Marc G. Fournier" <scrappy@hub.org> To: <freebsd-questions@freebsd.org> Sent: Monday, September 30, 2002 5:25 AM Subject: Per directory disk quotas ... : does anyone know of some way of setting a disk quota : onto a directory? so that a directory, and all : sub-directories/files below it cannot consume more : then x amount of space? Setting permissions that alloww only a certain group of users to write things in that directory, and then using edquota to limit the quota of that group under the directory. Let's say, for example, that you want to limit /mnt/foobar to 100 kbytes. Let's also assume that /mnt/foobar is under an /mnt mountpoint. Create a new group called "foobar". The name of the group doesn't need be the same. It might helps remembering what this group was created for later on though. # groupadd foobar Make root:foobar the owner of /mnt/foobar. # chown -R root:foobar /mnt/foobar Add write permission to /mnt/foobar for the group: # chmod 0775 /mnt/foobar Edit the "group quota" of foobar: # edquota -g foobar -f /mnt Done. Don't let "*:foobar" have write access anywhere else under /mnt and you're set to go. The users that belong to the "foobar" group will be limited under /mnt/foobar. If I've forgotten something, I'm sure someone can help? Giorgos. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002101c26838$78ec3b00$5bd7cdd4>