changing directory permissions recursively
Uwe Doering
gemini at geminix.org
Thu Apr 8 23:47:11 PDT 2004
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 at geminix.org | http://www.escapebox.net
More information about the freebsd-questions
mailing list