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 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
4 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