Thursday, September 1, 2011

Recursively Fixing File Permissions

Ahhh, the joys of restoring/moving files from a FAT32 external hard disk to a *nix system. Everything is 777, grrrrr. The all-knowing Google kindly directed me to try the following:
$ find . -type f -print0 | xargs -0 chmod 644
to chmod all files to 644, and
$ find . -type d -print0 | xargs -0 chmod 755
to chmod all directories to 755. Ahhh, the joys of bash commands.

No comments: