There are times that you want to set permission for a folder of files. It’s very tedious to change every single file, so you must ask: is there a way to chmod a folder recursively, so that all files in a folder or directory can be set to writable by one command? Well, the answer is: Yes. There is a way and it’s very simple. There is a recursive chmod
chmod -R 777 /home/shi/Desktop/Host/lab/txp
The above code will set permission for all files under /home/shi/Desktop/Host/lab/txp directory, you can change it to anything you may like to point to.
Hope this helps!



Thanks for the quick tip!
Hi Shi Chuan, howdie~ haha
Found your article when browsing for this topic lol.
Somehow the one works for me is:
chmod 775 -R
Thank you. It worked for me.
Pingback: IRC caused me to use Linux! Quick how to setup a shell server. | Linux Admins
This command saved me a lot of work. An application on my macbook just wouldn’t start until I changed the permission recursively to 777 for all the directories and files inside the top application directory. Thanks!
I use windows but my hosting is Linux and this useful for me
Or, you can use these to chmod files and directories differently::
for folders(directories):
find . -type d -exec chmod 777 {} \;for files:
find . -type f -exec chmod 666 {} \;