Change the permissions of a directory recursively
1 luglio 2008, 16:49 Open Source , Shell , System , Tips & Tricks July 1, 2008, 16:49Public here to tip a few, very few words to someone who asked me how we can recursively change the permissions of the entire contents of a directory in a correct and - most importantly - painless. Since we want to assign permissions to files and directories 644 755 - as always should be done - just move to that directory and run the following commands:
find . -type f -print0 | xargs -0 chmod 644
find . -type d -print0 | xargs -0 chmod 755
Others do not need ...















July 1, 2008 at 20:43
No excuse but a chmod-R and 'too complicated?
July 2, 2008 at 8:38
Hello Frederick,
chmod-R does not go well, keep in mind that the directories and files go to 755 to 644, with a simple chmod-R 644, or we can put it all in all to 755, but we can not distinguish between dir and file. I hope I explained myself better now.
Hello
PS: I'm on your blog at this moment, there are really interesting post, some very funny. Congratulations! Maybe eventually we could exchange some 'material, if you agree. See you soon.