User: Password:
|
|
Subscribe / Log in / New account

User and group mount options for ext filesystems

User and group mount options for ext filesystems

Posted May 17, 2012 4:48 UTC (Thu) by pr1268 (subscriber, #24648)
Parent article: User and group mount options for ext filesystems

I'm confused—why the colon notation in m:x and n:y (dot notation in the article text)? Are there two separate values, one each for m and x (and n and y)? Assuming one value is a UID (or GID), what's the second value for?


(Log in to post comments)

User and group mount options for ext filesystems

Posted May 17, 2012 6:00 UTC (Thu) by geofft (subscriber, #59789) [Link]

From the next line in the article:

"which would make the files appear to be owned by m.x and would create new files as n.y."

The usefulness of this makes is more obvious when you realize that m and x are user-visible uids/gids, and n and y are on-disk uids/gids -- different namespaces entirely. That is, if user geofft on my current system is uid 1001, and I'm mounting my laptop's root partition where user geofft is 1000, then I should mount with uid=1001:1000 so that everything appears owned by me now, but also so that anything new remains owned by me when I put the disk back into my laptop. 1001 is from the host's /etc/passwd, 1000 from the target's.

User and group mount options for ext filesystems

Posted May 17, 2012 9:20 UTC (Thu) by pr1268 (subscriber, #24648) [Link]

Thanks for the reply.

Of course, knowing myself, if I were to use such an implementation, I'd certainly get the m and the x backwards and really mess things up! :-)

User and group mount options for ext filesystems

Posted May 17, 2012 18:22 UTC (Thu) by knobunc (subscriber, #4678) [Link]

I was a little surprised that there was no way to do more than one user mapping.

For the stated use case, it makes sense, but it would be nice to be able to pull a disk from another machine (in a different uid scheme) and be able to mount it to back-up onto another machine, and provide a mapping for all user ids present on the disk.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds