This question already has an answer here:

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

marked as duplicate by Stéphane Chazelas files May 23 '18 at 20:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

find / '(' -type f -or -type d ')' \
       '(' '(' -user  nobody -perm -u=w ')' -or \
           '(' -group nobody -perm -g=w ')' -or \
           '('               -perm -o=w ')' ')' -print

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

  • 6
    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
  • Does this work if the nobody user is added to multiple groups? e.g. usermod -G group2 nobody – Craig Francis Apr 22 '18 at 10:53
  • @CraigFrancis No. This only takes the primary group into account. – Kusalananda Apr 22 '18 at 14:10

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