VarjuOrg

Linux / Windows – what’s the difference…

How to change Linux files/folders permissions under same directory recursively 644/755

One approach would be:

find . -type d -print0 | xargs -0 chmod 0755
find . -type f -print0 | xargs -0 chmod 0644

Other approach:

find /full/path/to/your/files -type f -exec chmod 644 {} \;
find /full/path/to/your/files -type d -exec chmod 755 {} \;

NB! Please do note that -f option is for files and -d option is for directories!
If some files are not owned by Your user but Your user is under sudoers – use sudo before find on the same line!

Leave a Reply

Your email address will not be published. Required fields are marked *