From owner-freebsd-questions@FreeBSD.ORG Sat May 12 16:21:30 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 504B1106566C for ; Sat, 12 May 2012 16:21:30 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id EEF2D8FC19 for ; Sat, 12 May 2012 16:21:29 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id q4CGMrxH045913 for freebsd-questions@freebsd.org; Sat, 12 May 2012 11:22:53 -0500 (CDT) Date: Sat, 12 May 2012 11:22:53 -0500 (CDT) From: Robert Bonomi Message-Id: <201205121622.q4CGMrxH045913@mail.r-bonomi.com> To: freebsd-questions@freebsd.org In-Reply-To: Subject: Re: file permission template 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, 12 May 2012 16:21:30 -0000 > I need a sort of file permission template. > Under some particular directory (like ~/secret), I need all those > files (including newly creating one) mode 700. > Is there any template-trick? Or "chmod -R 700" every time? As usual, 'insufficient data'. created 'by whom', and 'how'? some starting points: a) 'man umask'. b) 'man 2 chmod', c) see also how the 'setuid' bit works on directories note if '~/secret' is mode 700, no one other than the owner can list the files in it (or any subdirectory), nor can they use it in a path name. Is this sufficient? If not, exactly _what_ are you trying to accomplish?