[ubuntu-uk] Some advice - permissions

Neil Greenwood neil.greenwood.lug at gmail.com
Wed May 20 14:30:36 BST 2009

2009/5/20 Paul Sutton <zleap at zleap.net>:
> regarding point B, if you create a new users then won't this cause
> permission issues,  as say old system has
> /home/paul
> and the new install has /home/paul2
> the files will still belong to paul, and will need to have ownership
> changed (chown) and (chgrp) so you can read as the new user.
> Just a thought, but this is something to perhaps consider, comments
> welcome in case I have perhaps mis understood something.
> I have my files on a different partition which makes sense, but you also
> make a good point regarding back ups.

Hi Paul,

It gets a bit more complicated than this!

The filesystem stores the user and group for each file as a numeric
ID. Then the /etc/passwd and /etc/groups files provide a
cross-reference for converting the numeric ID into a user (or group)
name and vice versa.

When you create a user on a new installation, it uses the first free
numeric ID above a fixed offset (which I believe is 1000 for Ubuntu).

So in the original installation, user 'paul' probably has a numeric ID
(UID) of 1000. In the new installation, user 'paul2' probably has a
UID of 1000 too, since the new installation knows nothing about the
previous user called 'paul', apart from some files in the /home
partition belonging to a UID of 1000.

If you create more than one user in each installation, you have to
create them in the same order so that they get the same UIDs - if you
don't, this is the only time you should have to use the chown/chgrp
commands, although chown will change group too (just to confuse you
even more!).

Clear as mud?


More information about the ubuntu-uk mailing list