I removed my permissions on my downloads folder using chmod.

can anyone help restore back to default?

Thanks!

  • Eager Eagle
    link
    English
    118 months ago

    useful for chown, less so for chmod: I almost never want my dirs and files with the same permissions, and I made this mistake a few times.

    find dir -type f -exec chmod 644 -- {} +
    find dir -type d -exec chmod 755 -- {} +
    
    • @toynbee
      link
      38 months ago

      If all you need is to restore read permissions, you could use symbolic rather than octal:

      chmod -R a+r $DIR
      

      If you don’t want to grant read permissions to everyone you can replace the a with whichever applies of ugo for user, group or other.