• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 448
  • Last Modified:

How to restore default access rights to the directory structure of linux?

Hi all,

Is there a possibility to restore the default access rights to the default directory structure of linux?
I mean the default owner and rights to /etc /usr and so on, that were applyed during the installation
The distro in question is debian.

Thanks.
0
meciab
Asked:
meciab
1 Solution
 
de2ZotjesCommented:
NO.

short of restoring a backup or reinstalling the system I can see no way to do what you want here.
0
 
hoonexpertCommented:
No

This is not possible.

Regards,

Manish.
Baroda.
India.


0
 
Karl Heinz KremerCommented:
I would not say it's impossible, but it will be complicated: You need a fresh install of your system. Once you have that, you can write a Perl script that goes through the the directory hierarchy and records the ownership, group  and permissions for every single file and stores this data to a file. You take this file to your system that you want to repair and run a second Perl script that takes the information from your config file and applies the ownernship/group/permission information to all files listed in your config file. Once you are done, you can delete your temporary install of Debian again.

You don't have to use Perl, you can use any other language that allows you to get this information from the files, stores it to a file and restores this information again (this could even be a shell script).

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now