Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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

Posted on 2004-10-22
Medium Priority
Last Modified: 2012-08-13
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.

Question by:meciab
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 12387541

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

Expert Comment

ID: 12387722

This is not possible.



LVL 44

Accepted Solution

Karl Heinz Kremer earned 1500 total points
ID: 12387940
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).


Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question