Subject: Re: bug#8729: RFE: chmod "-D" operate on dir's only
From: Pádraig Brady <[email-masked]>
To: Linda Walsh <[email-masked]>
Cc: [email-masked]
Date: Wed, 25 May 2011 09:22:28 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On 25/05/11 02:57, Linda Walsh wrote:
> I know one can (and I usually do) construct a find command to do
> this, but it's something I do so often, and it's a natural 'pair'
> for what is often done with chmod.
> 
> If I want to make sure a dir tree is readable/accessable
> by a group or other, I usually do:
> 
>  chmod -R g+r,o+r .
>  find . -type d -print0|xargs -0 chmod g+x,o+x
> 
> What'd be a great addition to chmod is for it to have an option
> for chmod to only work on dirs.  (is -D taken?)
> 
> So instead of the 2nd line above:
> 
>  chmod -DR g+x,o+x

This was discussed before (the link is down ATM):
http://lists.gnu.org/archive/html/bug-coreutils/2010-02/msg00201.html

IIRC `chmod -R go+rX .` was deemed sufficient.
That will have the caveat of making existing executables,
executable by everyone.

I'll close this for now.

thanks,
Pádraig.