Usually you would use the
ls command to find out about files' permissions. But for a specific task, where you want to list files automatically that have certain permissions, using
ls, even if you filter the output with another utility like
grep, will quickly become very complex to do correctly. So for such tasks, you are better off using
If you want to list all files that are...
contained anywhere within your home directory (including in subdirectories of your home directory, subdirectories of those subdirectories, and so forth), and
that are also explicitly readable, writable, and executable by everyone
...then this command will do that for you:
find ~ -perm 777
It's really that simple.
If you only want to list files that meet the above two conditions and reside directly within the home directory (not inside any subdirectory), use this command instead:
find ~ -maxdepth 1 -perm 777
In this case,
777 will indicate files that are readable, writable, and executable for you, your group, and everyone else. If some of the files might have strange permission sets, such 477 (you can read the file, and everyone else can execute and write the file), you probably want to use:
find ~ -maxdepth 1 -perm -o+rwx
The leading hyphen before
-o+rwx means the file can have other permissions, and
o+rwx means that others (outside the group and user who own that file) can read, write, and execute this file, without checking any other permissions.
man find for details about how to perform these and similar operations, and
man chmod for the meaning of
777 and other numeric modes.