Find the answer to your Linux question:
Results 1 to 3 of 3
Hello guys! I was reorganizing my files and have encountered this problem. I change the persmission of a directory using Code: $ sudo chmod o+rwx FILE and it changes only ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272

    How to Change Permissions Main Directory down to the Last Directory


    Hello guys!

    I was reorganizing my files and have encountered this problem.

    I change the persmission of a directory using

    Code:
    $ sudo chmod o+rwx FILE
    and it changes only to find out that the files inside have also changed to I have to do this again..

    Code:
    sudo chmod o+rwx FILES_INSIDE
    And so on and so forth. It would take me ages to finish doing this to all my files.

    Can someone kindly give me a command that I can execute to recursively change my files and all sub files dwon the line to +rwx please?

    Thank you!
    Last edited by nujinini; 05-22-2012 at 05:34 AM. Reason: grammar
    nujinini
    Linux User #489667

  2. #2
    Just Joined!
    Join Date
    May 2012
    Posts
    11
    Use the recursive switch (its a CAPITAL -R)
    Code:
    sudo chmod -R o+rwx FILE

  3. #3
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Thank you mp035! DONE!

    I was trying to do it this way actually

    Code:
    $ sudo chmod o+rwx -r FILE
    And now I knwo where I got it wrong!

    Thank you again!

    regards,

    nujinini
    nujinini
    Linux User #489667

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •