The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

find command for 777 permission

Discussion in 'General Discussion' started by cannibal, Aug 31, 2007.

  1. cannibal

    cannibal Member

    Joined:
    Feb 12, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    I am running this command

    cd /home
    find . -type d -perm 777 > /root/xfile

    it will find all folders with 777 permission and list it in xfile

    ok how can I ignore some folders from getting scand and typed in xfile

    for example

    I trust folder (tfolder) and it has 777 permission

    how can I make it ignored from appearing in xfile ??
     
  2. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    I've been fiddling with similar things... try this...

    find . -type d -perm 777 -path '/home/tfolder' -prune > /root/xfile

    Actually, I found a cool script for finding world writable files - http://www.hccfl.edu/pollock/AUnix2/FindWritableFiles.htm - you would want to play with the path in the find command, but that's simple and it's an interesting tool.
     
Loading...

Share This Page