How can I find all files and directories with write permission turned on? I need to perform a recursive search also for all subdirectories.
The best tool for this job is find command. Find command allows you to search files and directories based on their permissions and various other factors. For example to find files and directories which have writable permissions turned on for user, group and other use the following command:
$ find /bin/ -perm /222
The above will recursively search entire /bin/ directory. If for instance we need to search only for a files which have writable permissions turned on only for others we modify our find command as follows:
$ find /bin/ -perm /002
The same can be achieved with symbolic representation. For example:
$ find /bin/ -perm /o=w