Você pode usar find
com o predicado -perm
. De man find
(POSIX):
-perm [-]mode
The mode argument is used to represent file mode bits. It shall
be identical in format to the symbolic_mode operand described in
chmod() , and shall be interpreted as follows. To start, a
template shall be assumed with all file mode bits cleared. An op
symbol of '+' shall set the appropriate mode bits in the
template; '-' shall clear the appropriate bits; '=' shall set
the appropriate mode bits, without regard to the contents of
process' file mode creation mask. The op symbol of '-' cannot be
the first character of mode; this avoids ambiguity with the
optional leading hyphen. Since the initial mode is all bits off,
there are not any symbolic modes that need to use '-' as the
first character.
If the hyphen is omitted, the primary shall evaluate as true when the
file permission bits exactly match the value of the resulting template.
Otherwise, if mode is prefixed by a hyphen, the primary shall evaluate
as true if at least all the bits in the resulting template are set in
the file permission bits.
Portanto, você pode tentar:
find /some/path/ -type f -perm -g=w
-type f
testa arquivos regulares. Para todo o sistema de arquivos, substitua /some/path
por /
.