From owner-freebsd-questions@FreeBSD.ORG Thu Apr 8 23:47:11 2004 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 CC12A16A4CE for ; Thu, 8 Apr 2004 23:47:11 -0700 (PDT) Received: from gen129.n001.c02.escapebox.net (gen129.n001.c02.escapebox.net [213.73.91.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55E4D43D46 for ; Thu, 8 Apr 2004 23:47:11 -0700 (PDT) (envelope-from gemini@geminix.org) Message-ID: <407646EB.7020708@geminix.org> Date: Fri, 09 Apr 2004 08:47:07 +0200 From: Uwe Doering Organization: Private UNIX Site User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040119 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <000501c41df5$519419f0$0200a8c0@satellite> <20040409055515.GA50737@alexis.mi.celestial.com> In-Reply-To: <20040409055515.GA50737@alexis.mi.celestial.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Received: from gemini by geminix.org with asmtp (TLSv1:AES256-SHA:256) (Exim 3.36 #1) id 1BBpnB-000NQv-00; Fri, 09 Apr 2004 08:47:09 +0200 Subject: Re: changing directory permissions recursively 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: Fri, 09 Apr 2004 06:47:11 -0000 Bill Campbell wrote: > On Fri, Apr 09, 2004, dave wrote: > >>Hello, >> I've got a problem, a directory area has the wrong permissions, occurred > >>from a dump restore. Now my user's can't get to the files within the area. I > >>could go around and do chmod permissions directoryname, but i was wondering >>if there was a perl or shell script that would do this? > > cd $topdir > find . -type d | xargs chmod 755 In case (potentially) untrusted users have had write permission in this directory tree in the past, a safer alternative would be find /path/to/tree/root -type d -print0 | xargs -0 chmod 755 Better safe than sorry. Uwe -- Uwe Doering | EscapeBox - Managed On-Demand UNIX Servers gemini@geminix.org | http://www.escapebox.net