# Fix Permissions, Find, Loop



## jrpmedia (Dec 4, 2018)

Hi,

I am a novice and trying to write a unix script to search a folder and fix the permissions on every file and folder changed in the last day or week.

I have this so far ... guidance please 

_Thank you_,

for line in "find /Users/admin/Desktop/SAM -mtime -1"; do
     chmod -R u+r+w+x,g+r+w-x,o+r+w-x $line;
done


----------

