need help restoring permissions on my downloads folder
need help restoring permissions on my downloads folder
I removed my permissions on my downloads folder using chmod.
can anyone help restore back to default?
Thanks!
You're viewing a single thread.
sudo chmod 755 ~/Downloads
assuming you don't need a recursive solution for subdirectories
73 1 ReplySudo is completely unnecessary here. If the owner changed, use chown first reset the user. Then use chmod to change permissions.
8 0 ReplyYou’re correct…sudo wasn’t necessary
3 0 Replythat's probably right, though sudo will work every time
1 0 ReplyYou should only use elevated privileges only when you need to. Otherwise you risk catastrophic failure.
7 2 ReplyNo I did not use "sudo rm -rf /*". How did you know?
1 1 ReplyDude! That’s just plain wrong!
If you wanter do remove the French language packs, you should have run
sudo rm -fr /*
5 1 ReplyNSFL
1 0 Reply
-R to recurse. Good for chmod and chown
8 1 Replyuseful 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 -- {} +
11 0 ReplyIf 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.3 0 ReplyGo over it with a second chmod -R but with -X to add execute but only to directories
1 1 Reply
Don't give all your files execution permissions.
chmod 644 -R Downloads chmod +x Downloads
3 0 ReplyThat's the same as 755, except you are only setting execute on the folder?
1 0 ReplyWhy would you want execute on anything but the folder?
1 0 Reply