From owner-freebsd-questions@FreeBSD.ORG Sat Sep 29 21:59:51 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC569106564A for ; Sat, 29 Sep 2012 21:59:51 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 790328FC0C for ; Sat, 29 Sep 2012 21:59:51 +0000 (UTC) Received: by oagn9 with SMTP id n9so3399892oag.13 for ; Sat, 29 Sep 2012 14:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=U1dCguT/lJUdN5mg850ZH+w/7OD77OYSiVEk8FTt8YM=; b=iHOutJKq5yzODC9UG6C9KzuS4FcNVAV3xSqAOMR6sW00d54SIi58/ie4S6rvSt7Jjf gqKwuCC11CRiWSL0z0mb19/tK+xMeLFyqswUxMe6EPU+Z3id2QgIeFVNP4AgOXFaPLES o95qsO+eY9vh+zLKyQ49zrhV+kPQ8jD9gA7o+KLouUJ00TNo2LIff+yBnI5/ObhIx38y 4KmrXVaWLwa7ZciaKLjnQXmPbEtzUjRGUZdSSg6Rnc7KynazEHZi0t/0KqVkBunPxkuB Z2HrsBxpgHcxZBU8m+I2agG90eHZBtlzxMLovHRdl8n2/0xsZKJr7ISPcFvMnw2W0Dwy oonA== MIME-Version: 1.0 Received: by 10.60.19.195 with SMTP id h3mr8570957oee.102.1348955990653; Sat, 29 Sep 2012 14:59:50 -0700 (PDT) Received: by 10.76.172.67 with HTTP; Sat, 29 Sep 2012 14:59:50 -0700 (PDT) In-Reply-To: <6B256EAE618B4A87F4D57217@Pauls-MacBook-Pro.local> References: <6B256EAE618B4A87F4D57217@Pauls-MacBook-Pro.local> Date: Sat, 29 Sep 2012 16:59:50 -0500 Message-ID: From: Adam Vande More To: Paul Schmehl Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Questions Subject: Re: File permissions - how to "lock" a directory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2012 21:59:51 -0000 On Sat, Sep 29, 2012 at 4:41 PM, Paul Schmehl wrote: > I have a particularly thorny problem I'm trying to solve, but I'll bet > FreeBSD has a solution. > > I'm running a webserver using suphp. It's very picky about permissions. > It wants the web server user (www) to be the owner of all directories and > files. > > Meanwhile, the site owners want to be able to update and add files to the > site. When they update files everything is fine. When they upload new > files, the ownership of the file is user:user instead of www:user, so > apache can't display them. > > Is there a way to "lock" a directory such that all files created in that > directory are owned by the directory owner? If not, I'll have to script > something to change perms after uploads. > There is the suiddir option, see mount(8) and chmod(2). -- Adam Vande More