I found I've a kind of messed up most part of my system permissions. Some places that only owner should have access is now exposed to world. How can I reset the folder permissions to default like i just installed a new OS?

I use Parrot GNU/Linux 4.5

  • 2
    You can't. Your system doesn't remember the original permissions. Unless you have backup, or you'll have to reinstall your system. – 炸鱼薯条德里克 Feb 19 at 9:59
  • 1
    What directory is it? What did you do to mess it up? – Torin Feb 19 at 10:05
  • my Downloads and Desktop majorly. I want to reset my Desktop to no1 can delete or tamper with files without being admin(sudo permission). and also my Downloads isnt accepting files now when i try to save like an image from browser – Francis Igbokwe Feb 19 at 10:38

Assuming your Download and Desktop folders are in your home directory, you should start by making sure the permissions in your home directory are all set correctly.
You want files in you home directory readable and writeable by yourself, so you can do (in a a shell):

$ chmod -R u+rw $HOME

You don't want your files readable by everybody, so you can do

$ chmod -R o-rwx $HOME

You might want your files readable by others in your group but not writeable:

$ chmod -R g+r $HOME
$ chmod -R g-w $HOME

This will get your home directory back to sensible defaults

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.