coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature Request: chmod u+s/g+s/+t for dirs only


From: Pádraig Brady
Subject: Re: Feature Request: chmod u+s/g+s/+t for dirs only
Date: Tue, 4 Feb 2025 18:36:15 +0000
User-agent: Mozilla Thunderbird Beta

On 03/02/2025 19:22, Aaron Davies wrote:
FYI my specific use case is a secure environment where files owned by
anyone can be chmod'd via a program that can only run single
commands--if many directories need to be changed, `chmod -R g+S dir`
could be much faster than `find dir -type d -not -perm -g+s -exec
chmod g+s '{}' \;`.

On Mon, Feb 3, 2025 at 1:07 PM Aaron Davies <aaron.davies@gmail.com> wrote:

In the contexts of recursive chmod, it would be useful to be able to
apply u+s, g+s, and +t only to directories. In the spirit of the
existing +X option, I suggest u+S/g+S/+T as the syntax for this
behavior.

Similar suggestions have been made, as detailed at:
https://www.gnu.org/software/coreutils/rejected_requests.html#chmod

I don't know your specific environment.
But would the POSIX "find -exec ... +" construct help efficiency for you?
I.e. a + rather than ; in your example.
"find -type d -print0 | xargs -r0 ..." is also an option for efficiency.

cheers,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]