From owner-freebsd-questions Sat May 27 10:46:12 2000 Delivered-To: freebsd-questions@freebsd.org Received: from draenor.org (draenor.org [196.36.119.129]) by hub.freebsd.org (Postfix) with ESMTP id E571337B8B4 for ; Sat, 27 May 2000 10:46:03 -0700 (PDT) (envelope-from marcs@draenor.org) Received: from marcs by draenor.org with local (Exim 3.14 #1) id 12vkeG-00090i-00; Sat, 27 May 2000 19:45:20 +0200 Date: Sat, 27 May 2000 19:45:20 +0200 From: Marc Silver To: Andy Coates Cc: freebsd-questions@freebsd.org Subject: Re: Quota and Apache Logs Puzzle Message-ID: <20000527194520.T2219@draenor.org> References: <00df01bfc801$8e3e8e10$0100a8c0@blade> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <00df01bfc801$8e3e8e10$0100a8c0@blade>; from andy@friends-tv.net on Sat, May 27, 2000 at 06:30:46PM +0100 X-Operating-System: FreeBSD 4.0-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Simple. (or at least I think so). Simply create the directory as root. Leave the permissions as owned by root, and the group wheel. Then, you'll want to enable sticky bit on the directory itself. To do this: chmod 1777 You'll then have a directory that is the equivalent of /tmp, from which users can write to and delete, but cannot remove the directory or files that belong to another user. You'll have to make sure though that the actual log file is owned by the user in the logfile directory. This *should* be a near-perfect solution. Good luck, Cheers, Marc On Sat, May 27, 2000 at 06:30:46PM +0100, Andy Coates wrote: > Hi, > > I've decided to setup apache to store logfiles in the user's own directory, > say ~user/logs. I also want to make those logfiles part of the users quota. > > Here comes the bit thats stumped me... if I create a virtual host for the > user, and I don't create the log directory, apache won't start because the > log directory doesn't exist. If I do create the log directory (as root), the > normal ownerships for the directory are user root group , which the > user can delete, hence if done apache wouldn't start. So if I make ownership > root/wheel, the user can't delete it and apache will be fine as the > directory will always be there. But.... then the log files will be the > ownership of root and won't count in the quota. > > Its fried my brain trying to work out the right method for this, so I'm > writing this to see if anyone out there can help me out with the situation - > either correcting where I went wrong or maybe suggesting an alternative. > > TIA, > Andy. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message