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

Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top