-2

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.

5
  • 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, 2013 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, 2013 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, 2013 at 3:22
  • Did chmod -R 666 /usr not provide the desired results?
    – jscott
    Feb 6, 2013 at 3:40
  • No I won't chmod at /usr, it was just an example. Feb 7, 2013 at 2:05

1 Answer 1

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.

1
  • This was not an answer (the man for chmod is pages and pages long -- that's the point why OP is here). Here is the real answer: chmod 666 -R /usr
    – dylanh724
    Jun 9, 2020 at 3:49

Not the answer you're looking for? Browse other questions tagged .