@Another_username@lemmy.world to Linux@lemmy.ml • edit-22 years agoneed help restoring permissions on my downloads folderlemmy.worldimagemessage-square40fedilinkarrow-up162arrow-down18
arrow-up154arrow-down1imageneed help restoring permissions on my downloads folderlemmy.world@Another_username@lemmy.world to Linux@lemmy.ml • edit-22 years agomessage-square40fedilink
I removed my permissions on my downloads folder using chmod. can anyone help restore back to default? Thanks!
minus-squareEager EaglelinkfedilinkEnglish72•2 years agosudo chmod 755 ~/Downloads assuming you don’t need a recursive solution for subdirectories
minus-squaret҉̠̙ǵ̣̞̄ͪ͜x̸̱͚̳ͫ͐̑̈ͯͣ̚n̒͌҉͉̦̜̝ͅlinkfedilink7•2 years ago-R to recurse. Good for chmod and chown
minus-squareEager EaglelinkfedilinkEnglish11•2 years agouseful 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 -- {} +
minus-square@toynbee@lemmy.worldlinkfedilink3•2 years agoIf 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.
minus-squarecaseyweedermanlinkfedilink0•2 years agoGo over it with a second chmod -R but with -X to add execute but only to directories
minus-squarePossibly linuxlinkfedilinkEnglish4•edit-22 years agoDon’t give all your files execution permissions. chmod 644 -R Downloads chmod +x Downloads
minus-squaret҉̠̙ǵ̣̞̄ͪ͜x̸̱͚̳ͫ͐̑̈ͯͣ̚n̒͌҉͉̦̜̝ͅlinkfedilink1•edit-22 years agoThat’s the same as 755, except you are only setting execute on the folder?
minus-squarePossibly linuxlinkfedilinkEnglish1•2 years agoWhy would you want execute on anything but the folder?
sudo chmod 755 ~/Downloadsassuming you don’t need a recursive solution for subdirectories
-R to recurse. Good for chmod and chown
useful for
chown, less so forchmod: I almost never want my dirs and files with the same permissions, and I made this mistake a few times.If all you need is to restore read permissions, you could use symbolic rather than octal:
If you don’t want to grant read permissions to everyone you can replace the
awith whichever applies ofugofor user, group or other.Go over it with a second chmod -R but with -X to add execute but only to directories
Don’t give all your files execution permissions.
That’s the same as 755, except you are only setting execute on the folder?
Why would you want execute on anything but the folder?