I run fedora 30 on my computer. As user foo, my home directory rights look like this:
[foo@localhost]$ ls -l /home/
drwx------. 41 foo foo 4.0K Jul 12 11:23 foo
drwx------. 2 root root 16K Jul 18 2018 lost+found
When I boot from a usb drive (fedora 30 again), mount the local home partition and check ownership, this is what I get.
[liveuser@pendrive]$ cd <path/to/mounted/home>
[liveuser@pendrive]$ ls -l
drwx------. 41 liveuser liveuser 4.0K Jul 12 11:23 foo
drwx------. 2 root root 16K Jul 18 2018 lost+found
Then as liveuser, I can access the directory foo, read and write on files with user-only rights.
The uid of: liveuser on the usb stick, and foo on the local hard drive; are both 1000.
My guess is that this is the origin of the problem and both users are considered to be the same.
Is this behavior expected ? If so, how can this be fixed ?