From owner-freebsd-questions Sun Sep 29 21:18:53 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B25437B404 for ; Sun, 29 Sep 2002 21:18:51 -0700 (PDT) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34C3843E4A for ; Sun, 29 Sep 2002 21:18:50 -0700 (PDT) (envelope-from keramida@FreeBSD.org) Received: from ftp.otenet.gr (ftp.otenet.gr [195.170.0.21]) by mailsrv.otenet.gr (8.12.4/8.12.4) with ESMTP id g8U4Imbx012201; Mon, 30 Sep 2002 07:18:48 +0300 (EEST) Received: from LocalHost (patr530-a091.otenet.gr [212.205.215.91]) by ftp.otenet.gr (8.12.4/8.12.4) with SMTP id g8U4IULG024388; Mon, 30 Sep 2002 07:18:38 +0300 (EEST) Message-ID: <002101c26838$78ec3b00$5bd7cdd4@LocalHost> From: "Giorgos Keramidas" To: "Marc G. Fournier" , References: <20020929231438.W69855-100000@hub.org> Subject: Re: Per directory disk quotas ... Date: Mon, 30 Sep 2002 07:18:29 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message -----=20 From: "Marc G. Fournier" To: 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