HD permissions stay put (SOLVED)

Johan Scheepers johansche at telkomsa.net
Mon Jul 4 07:45:37 UTC 2011

On 03/07/2011 20:25, JD wrote:
> On 07/03/2011 11:09 AM, Johan Scheepers wrote:
>> On 03/07/2011 20:01, JD wrote:
>>> On 07/03/2011 10:55 AM, Petrus de Calguarium wrote:
>>>> Johan Scheepers wrote:
>>>>> I have a multiple boot internal drive (different linux
>>>>> flavors)(excluding windows).
>>>>> Have a external usb drive for backup between these different systems.
>>>>> Now booting in a different flavor the permissions change to numbers.
>>>>> My normal permission is johan johan. I am the only user at home.
>>>> I had that, too, a long time ago. It came from experimenting with Debian,
>>>> Ubunto and others and using the same username on those other non-Fedora
>>>> systems. What I did was not really a solution. Since I am a confirmed
>>>> Fedoristo, I simply do not mount my home/Documents partition to alien systems.
>>> Johan,
>>> can you check /etc/passwd to see if the number of your uid belongs to
>>> user johan
>>> and check /etc/group to see if there is a group named johan and what
>>> it's gid is?
>> Machine one..johan 1000:1000
>> Machine two ..johan 500:500
> OK! now we are getting somewhere.
> Is your same home account mounted by both machines? (I assume that it is).
> if you
> ls -ld $HOME
> and you get   johan   johan
> for UID and GID ownership, then on that
> machine, your home dir's UID and GID numbers
> match the numbers in the password file and the group file.
> If not, then your home directory and it's contents
> belong to the user whose UI and GID match the password
> and group files in /etc.
> On the machine that displays numbers, you need
> to become root and modify the uid and gid of user johan.
> If you cannot become root, then you can have some
> more work to do:
> 1. On the machine where you CAN become root, then become root, and
> execute  /usr/bin/system-config-users
File not existing
>    and in the GUI modify the UID and GID of user johan to match the
> numbers on the other machine.
> This means that after you finish the modification,
> you have to be sure that the /etc/passwd and /etc/group have
> the right numbers for UID and GID and they match the other machine.
> 2. as root, execute the command:
>       chmod -R johan:johan ~johan
>       On some versions of linux, the command takes the form
>       chmod -R johan.johan ~johan
>       On some other linux'es both variations work.
Thanks to all who jumped in. There seem to be a lot of interest.
Hi JD..
I used your advice with some modifications.
First it is not a different machine but different distro's on same machine.
Distro one being my main distro and was already..

johan at johan:~$ id
uid=1000(johan) gid=1000(johan) 
johan at johan:~$

so distro two needed changing because it was 500.
  Booted in distro 2 and as root..

/etc/passwd and changed appropriate line to read..
johan:x:1000:1000:Johan Scheepers:/home/johan:/bin/bash

and then gedit..

and changed appropriate line to..


Then in /home/johan did....
chown johan ~johan
chgrp johan ~johan

Logged out / in and was OK.

Rebooted 5 times both ways and permissions stayed put.

Now reading all the responses it seems there is more than one way to do this.

Again thanks to all.
Johan S

More information about the ubuntu-users mailing list