Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

I want to make an chmod command that's recursively will apply the privilegies to all directoris under that. Example:

chmod 666 /usr

I want that every directory under "/usr" turn into permissions to 666.

Thanks in advance.

share|improve this question

marked as duplicate by Michael Hampton, EEAA, Scott Pack, mdpc, voretaq7 Feb 6 '13 at 3:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4  
You surely don't want to make that change to /usr. There are good reasons that linux distributions set the permissions they do, and it is at your own peril to change them in such a drastic fashion. –  EEAA Feb 6 '13 at 2:16
    
To expound, the security ramifications of making this change are profound. Giving write access to all of /usr, well, you might as well walk around all day with your pants down. –  EEAA Feb 6 '13 at 2:21
    
Frankly, If you can't figure out how to do this without asking us you've got no business doing it. Please see the question I've marked this as a duplicate of for why this is a BAD IDEA. If after reading and understanding that question and the answers you still think this is what you want, ask the question again in terms of a practical end goal rather than its current form, which is effectively "How to I wreck my system to the point where I have to reinstall it?" –  voretaq7 Feb 6 '13 at 3:22
    
Did chmod -R 666 /usr not provide the desired results? –  jscott Feb 6 '13 at 3:40
    
No I won't chmod at /usr, it was just an example. –  guisantogui Feb 7 '13 at 2:05

1 Answer 1

First, please learn to read man pages:

$ man chmod

Partway down that page, you will see:

-R, --recursive
              change files and directories recursively

And there's your answer.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.