I removed my permissions on my downloads folder using chmod.

can anyone help restore back to default?

Thanks!

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    10 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@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      10 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.