From owner-freebsd-questions@FreeBSD.ORG Fri Nov 14 19:52:43 2003 Return-Path: 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 75A6A16A4CE for ; Fri, 14 Nov 2003 19:52:43 -0800 (PST) Received: from hotmail.com (bay7-f104.bay7.hotmail.com [64.4.11.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE76743FE9 for ; Fri, 14 Nov 2003 19:52:40 -0800 (PST) (envelope-from howcanthisbe300@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 14 Nov 2003 19:52:40 -0800 Received: from 220.240.226.38 by by7fd.bay7.hotmail.msn.com with HTTP; Sat, 15 Nov 2003 03:52:40 GMT X-Originating-IP: [220.240.226.38] X-Originating-Email: [howcanthisbe300@hotmail.com] From: "How Can ThisBe" To: freebsd-questions@FreeBSD.ORG Date: Sat, 15 Nov 2003 03:52:40 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 15 Nov 2003 03:52:40.0710 (UTC) FILETIME=[EAC30A60:01C3AB2B] Subject: File permission question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2003 03:52:43 -0000 Hi, I've just noticed a small issue, which I'm sure others are aware of. For apache to server users webpages, apache need to be able to read files and directories. So we have something like the following (by default) on FreeBSD; tigger@piglet:~% ls -Al ./ public_html/index.php | grep pub -rw-r--r-- 1 tigger tigger 16 Mar 24 2002 public_html/index.php drwxr-xr-x 12 tigger tigger 512 Aug 14 02:04 public_html/ However, the following set-up is a little more secure (users can not read other users includes files for a start) and works fine; tigger@piglet:~% ls -Al ./ public_html/index.php | grep pub -rw-r----- 1 tigger www 16 Mar 24 2002 public_html/index.php drwxr-x--- 12 tigger www 512 Aug 14 02:04 public_html/ My question is, when I make a new file or directory in ~/public_html (with chown tigger:www), the file is made with the following permission: -rw-r--r-- 1 tigger www 0 Nov 15 13:42 public_html/test1.php How can I make new files without the world readable flag set, within the public_html directory? _________________________________________________________________ Hot chart ringtones and polyphonics. Go to http://ninemsn.com.au/mobilemania/default.asp