I have noticed an issue that is very irritating about Tumbleweed. All folders (and I think files too) symlinked from my data partition (automounted on start up as it’s mentioned in my fstab file) are owned by a non-existent user named ‘linux’. This is irritating as these messed up permissions are …ing up my other distributions and their behaviours based on these folders. My fstab file is:
Funny thing is that I automount my data partition this way on other distributions (including Arch, deepin, Fedora, Gentoo, KDE Neon, Linux Mint, Mageia and Void Linux) and on these other distributions this problem has never happened. Is this like an AppArmor feature or something?
Long fstab, but which entry are you talking about?
Is that the one with mountpoint /data? (I assume you may have used this mount point for what you use loosely “my data partition”.
All folders (and I think files too) symlinked from my data partition
One often creates symlinks from e.g. a place inside ones home directory to a directory/file in a partition outside one’s home directory. It is not clear to me from the above if you mean this, or if you mean that there are symlinks from inside /data to other places (that is what is read in your statement. So please explain again what is symlinked to what. As always illustrating your statemenst/conclusions with computer facts like, in this case, ls -l listings from at least one example says much more then thousand words.
In any case, please provide computer information about ownership of file on /data, both with user names group names and with uids, gids:
Never mind I think the problem was that I had a user that was automatically created from the Tumbleweed installer (not sure why) that was called “Live CD user”. The permissions were set like the Live CD user was going to use these files. I think this user was called ‘linux’, I didn’t realize a user named linux existed, but just encase I ran userdel linux and now the Live CD user doesn’t appear in the user accounts section of GNOME settings and the folders do not seem to be changed in ownership so that this user was the owner instead of my user (I use the same user across all distros so that permissions issues on the /data partition should not arise. The permissions were set so my user owned all the files on this partition). So therefore I assume that this “Live CD user” was the ‘linux’ account and due to this account’s presence my /data partition’s files permissions were being changed so that this user could read and write data from/to it.
You should be careful when using the same partition over various distros.
I’ve been bitten a few times, because not all distros use the same convention when assigning user IDs.
Let me explain: on openSUSE I see that UIDs for system users are all < 1000, while UIDs for local users are >= 1000.
Another distro could be using a different convention, so that user 1000 (that typically on openSUSE is your local user) could be mapped to a system user.
Ownership, at the file system level, is recorded using UIDs and GIDs, not using the name of the user and group, so when changing distro you may find that your files are mapped to a completely different user/group.
The solution is to directly assign the UID to your user name when installing a new distro (typically installers let you do this, but the setting is hidden behind an “advanced settings” button or something like this).
It seems like ol’ Tumbleweed uses the UID of 1001 for my user while my other installed distributions (of which there are ~10) uses a UID of 1000. To correct this I signed out of my user account and ran: