Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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've got a dev box running 10.10 Desktop, and I'd like to start over with a fresh 12.04 install. I figure this would be cleaner than a series of upgrades through all the intermediate installs. It can't hurt to clean out the crud that I've tinkered with along the way too.

Most if not all my materials are on an mdadm RAID 1 pair mounted at /data. This includes a set of gitosis-served git repositories, which at at /data/git; in order to do this, I moved the gitosis user's home dir to /data/git.

My plan is to do a clean install, re-assemble the RAID, recreate the gitosis user etc.

My main question is about permissions. What happens to the permissions for directories on the RAID device? I assume that they will end up tied to UIDs of users that don't exist. Do I just have to go back through chown-ing and chgrp-ing them to bring them back into line with what was there before? Or is there a clean way to map them back to new users of the same name?

As an aside, i've rsynced a copy of / (excluding /data) to a backup dir on the RAID device (and most likely will to an external too). Is that enough to ensure I've got all my old config files etc in case i need to refer back to them? Any insight appreciated. thanks, Hugh

share|improve this question
up vote 1 down vote accepted

The raid is irrelevant. When you reinstall, you just need to make sure you recreate the users/groups with the same IDs, or chown all of the files to their new IDs. The simplest thing to do is backup your /etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow files to preserve all of the existing accounts as-is.

share|improve this answer
Thanks for this. To be clear, once reinstalled, overwrite these from backup, reboot, and the permissions should be re-established as they were before? – hughc May 31 '12 at 2:50

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.