What your looking for is the -R option. Example:
 
chmod -R 755 /home/jim
 
since web files should be 644 and dirs 755 i like to do this and sometimes its helpfull..
 
chmod -R 644 /home/jim (which is where i have my domains web pages)
then i go in to jim and change all the dirs to 755..
 
BE CAREFULL WITH -R which stands for recursive. I once did a chmod -R 644 * and i THOUGHT i was in the right dir. turns out i was in the / dir... good way to trash an entire server in about 10 seconds... but that was like 3 years ago..im feeling much better now...LOL..
Jim.
----- Original Message -----
Sent: Friday, December 07, 2001 5:40 PM
Subject: OT: Bulk changing of file permissions/owners

I guess this is a really simple one but I can't find an answer anywhere at the moment.
 
Is it possible to change the ownership or permissions of the contents of entire directory including the sub directories? If so, how?
 
Thanks in Anticipation.
 
Alex

Reply via email to