Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I determine all files and folders that given user can write to? The user is nobody. Some script in bash or python, perhaps? I'm using Ubuntu 11.04

share|improve this question
up vote 11 down vote accepted
find / \( -type f -or -type d \) \
  \( \
    \( -user nobody -perm -u=w \) -or \
    \( -group nobody -perm -g=w \) -or \
    -perm -o=w \
  \) \

This will find all files and directories belonging to nobody that are user writable, or that belong to the group nobody that are group writable, as well as all files or directories that are writable by anyone.

share|improve this answer
GNU find also has a -writable option that tests write access for the user running the find process. So you could do something like sudo -u nobody find / -writable -print. – jw013 Oct 11 '11 at 22:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.