@Another_username to [email protected] • edit-210 months agoneed help restoring permissions on my downloads folderimagemessage-square49arrow-up162arrow-down18file-text
arrow-up154arrow-down1imageneed help restoring permissions on my downloads folder@Another_username to [email protected] • edit-210 months agomessage-square49file-text
I removed my permissions on my downloads folder using chmod. can anyone help restore back to default? Thanks!
minus-squareEager EaglelinkEnglish72•10 months agosudo chmod 755 ~/Downloads assuming you don’t need a recursive solution for subdirectories
minus-square@bitchkatlink8•10 months agoSudo is completely unnecessary here. If the owner changed, use chown first reset the user. Then use chmod to change permissions.
minus-squareEager EaglelinkEnglish1•10 months agothat’s probably right, though sudo will work every time
minus-square@dohpaz42linkEnglish5•10 months agoYou should only use elevated privileges only when you need to. Otherwise you risk catastrophic failure.
minus-square@WhyAUsername_1link0•edit-210 months agoNo I did not use “sudo rm -rf /*”. How did you know?
minus-square@bushvinlink4•10 months agoDude! That’s just plain wrong! If you wanter do remove the French language packs, you should have run sudo rm -fr /*
minus-squaret҉̠̙ǵ̣̞̄ͪ͜x̸̱͚̳ͫ͐̑̈ͯͣ̚n̒͌҉͉̦̜̝ͅlinkfedilink7•10 months ago-R to recurse. Good for chmod and chown
minus-squareEager EaglelinkEnglish11•10 months 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@toynbeelink3•10 months 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-square@[email protected]linkfedilink0•10 months agoGo over it with a second chmod -R but with -X to add execute but only to directories
minus-squarePossibly linuxlinkfedilinkEnglish3•edit-210 months agoDon’t give all your files execution permissions. chmod 644 -R Downloads chmod +x Downloads
minus-squaret҉̠̙ǵ̣̞̄ͪ͜x̸̱͚̳ͫ͐̑̈ͯͣ̚n̒͌҉͉̦̜̝ͅlinkfedilink1•edit-210 months agoThat’s the same as 755, except you are only setting execute on the folder?
minus-squarePossibly linuxlinkfedilinkEnglish1•10 months agoWhy would you want execute on anything but the folder?
sudo chmod 755 ~/Downloads
assuming you don’t need a recursive solution for subdirectories
Sudo is completely unnecessary here. If the owner changed, use chown first reset the user. Then use chmod to change permissions.
You’re correct…sudo wasn’t necessary
that’s probably right, though sudo will work every time
You should only use elevated privileges only when you need to. Otherwise you risk catastrophic failure.
No I did not use “sudo rm -rf /*”. How did you know?
Dude! That’s just plain wrong!
If you wanter do remove the French language packs, you should have run
sudo rm -fr /*
NSFL
-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.find dir -type f -exec chmod 644 -- {} + find dir -type d -exec chmod 755 -- {} +
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 ofugo
for 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.
chmod 644 -R Downloads chmod +x Downloads
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?