1

I am wondering if Ext4 file system stores names or IDs for file ownership information? Most probably the IDs... but that makes another question.

Does all Ubuntu versions have standardized IDs for common usernames? For example:

  • mail:8
  • www-data:33
  • syslog:104
  • postfix:107

What about other Linux distributions? BSDs?

Edited to clarify: What happens when I mount Ext4 HDD on different Linux where user IDs are different? Are permissions/ownership broken? Or Ext4 stores usernames and groupnames? What happens if particular group or user is deleted?

  • 1
    What did you mean by "Ext4 file system stores names or IDs"? – souravc Feb 15 '16 at 16:44
  • I mean, file and directory ownership. Owner info associated with files. – Maris B. Feb 15 '16 at 16:52
1

Ubuntu has a set of standardized usernames, UIDs, groups and GIDs. These are provided by the base-passwd package. See my answer on Unix & Linux (or /usr/share/doc/base-passwd/users-and-groups.txt.gz) for more information on those.

As for the filesystem, it stores UIDs and GIDs. The mapping between names and IDs are done by Name Service Switch (NSS) using the passwd and group databases. Unless you have the same mappings, the same UID might show up as different usernames on different systems.

If user a has UID 1000 on one system and creates files belong to it, and the filesystem is mounted on another system with b having UID 1000, then the second system will show b as the owner.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.