Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I forgot to setup options using 'cp', so all permissions and ownership of made backup are default. I copied the next directories:

  • /etc
  • /bin
  • /home
  • /lib
  • /opt
  • /sbin
  • /usr
  • /var

I am using Fedora 13. So, how can I restore correctly previous directories to my current reinstalled system, what permissions and ownership should this directories and files to be? My default account is 'master'. Also I want to see copied program icons in Gnome menu but they are empty.

share|improve this question
up vote 3 down vote accepted

rpm -a --setperms --setugids will handle the system directories. You're on your own for /home and /srv.

Also, rsync -a.

share|improve this answer
Thanks, and also there will be f.e. /etc/passwd permitted successfully? I mean is this will set perms and etc to ALL files in system directories? And how can I update programs icons? – purple Sep 5 '10 at 23:36
It will reset all permissions and ownership on all entries in the rpmdb. The icons should come back once all your permissions are correct. – Ignacio Vazquez-Abrams Sep 5 '10 at 23:58
Ok it works, also I fixed some problems with perms of auditd config files and some another services. But now I have another problem - after starting login window dont show available users and I can't change keyboard layout, what maybe the problem? – purple Sep 6 '10 at 15:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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