<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Yes, really. It's in the mount manpage. Sorry to RTFM but if you do you'll find a reference to the kernel source directory for documentation on filesystem options:</div><div><br></div><div><i>Documentation/filesystems.</i></div><div><i><br></i></div><div><i>In his case, section 3 of:</i></div><div><i><a href="https://www.kernel.org/doc/Documentation/filesystems/ext4.txt">https://www.kernel.org/doc/Documentation/filesystems/ext4.txt</a><br></i></div><div><i><br></i></div><div>There are commonalities between the filesystem options but they're ultimately defined in each filesystem's <a href="https://github.com/torvalds/linux/tree/master/fs/ext4">drivers</a> and don't necessarily overlap (and often don't for low level tweak options).<br></div></div><div dir="ltr"><br></div><div>If you are interested in playing with alternative filesystems like in the case of removable media so you dont have to worry about uid mismatch between different systems using the media, the FAT, VFAT, and EXFAT (as well as NTFS/NTFS-3G if you dare) filesystems all support a umask option for portability. That option is one that is filesystem-specific.</div><div><br></div><div>Example for VFAT in the same documentation directory:</div><div><a href="https://www.kernel.org/doc/Documentation/filesystems/vfat.txt">https://www.kernel.org/doc/Documentation/filesystems/vfat.txt</a><br></div><div dir="ltr"><div><br></div><div>I went ahead and checked to see if there might have been an undocumented uid or gid masking option in the ext4 filesystem source code and found these but it looks like that one was omitted. That could be by design.</div><div><br></div><div><u><b><span style="font-family:monospace,monospace">.../kernel-src/current/fs/ext4/super.c:</span></b></u><br></div><div><span style="font-family:monospace,monospace">1446 static const match_table_t tokens = {<br>1447 {Opt_bsd_df, "bsddf"},<br>1448 {Opt_minix_df, "minixdf"},<br>1449 {Opt_grpid, "grpid"},<br>1450 {Opt_grpid, "bsdgroups"},<br>1451 {Opt_nogrpid, "nogrpid"},<br>1452 {Opt_nogrpid, "sysvgroups"},<br>1453 {Opt_resgid, "resgid=%u"},<br>1454 {Opt_resuid, "resuid=%u"},<br>1455 {Opt_sb, "sb=%u"},<br>1456 {Opt_err_cont, "errors=continue"},<br>1457 {Opt_err_panic, "errors=panic"},<br>1458 {Opt_err_ro, "errors=remount-ro"},<br>1459 {Opt_nouid32, "nouid32"},<br>1460 {Opt_debug, "debug"},<br>1461 {Opt_removed, "oldalloc"},<br>1462 {Opt_removed, "orlov"},<br>1463 {Opt_user_xattr, "user_xattr"},<br>1464 {Opt_nouser_xattr, "nouser_xattr"},<br>1465 {Opt_acl, "acl"},<br>1466 {Opt_noacl, "noacl"},<br>1467 {Opt_noload, "norecovery"},<br>1468 {Opt_noload, "noload"},<br>1469 {Opt_removed, "nobh"},<br>1470 {Opt_removed, "bh"},<br>1471 {Opt_commit, "commit=%u"},<br>1472 {Opt_min_batch_time, "min_batch_time=%u"},<br>1473 {Opt_max_batch_time, "max_batch_time=%u"},<br>1474 {Opt_journal_dev, "journal_dev=%u"},<br>1475 {Opt_journal_path, "journal_path=%s"},<br>1476 {Opt_journal_checksum, "journal_checksum"},<br>1477 {Opt_nojournal_checksum, "nojournal_checksum"},<br>1478 {Opt_journal_async_commit, "journal_async_commit"},<br>1479 {Opt_abort, "abort"},<br>1480 {Opt_data_journal, "data=journal"},<br>1481 {Opt_data_ordered, "data=ordered"},<br>1482 {Opt_data_writeback, "data=writeback"},<br>1483 {Opt_data_err_abort, "data_err=abort"},<br>1484 {Opt_data_err_ignore, "data_err=ignore"},<br>1485 {Opt_offusrjquota, "usrjquota="},<br>1486 {Opt_usrjquota, "usrjquota=%s"},<br>1487 {Opt_offgrpjquota, "grpjquota="},<br>1488 {Opt_grpjquota, "grpjquota=%s"},<br>1489 {Opt_jqfmt_vfsold, "jqfmt=vfsold"},<br>1490 {Opt_jqfmt_vfsv0, "jqfmt=vfsv0"},<br>1491 {Opt_jqfmt_vfsv1, "jqfmt=vfsv1"},<br>1492 {Opt_grpquota, "grpquota"},<br>1493 {Opt_noquota, "noquota"},<br>1494 {Opt_quota, "quota"},<br>1495 {Opt_usrquota, "usrquota"},<br>1496 {Opt_prjquota, "prjquota"},<br>1497 {Opt_barrier, "barrier=%u"},<br>1498 {Opt_barrier, "barrier"},<br>1499 {Opt_nobarrier, "nobarrier"},<br>1500 {Opt_i_version, "i_version"},<br>1501 {Opt_dax, "dax"},<br>1502 {Opt_stripe, "stripe=%u"},<br>1503 {Opt_delalloc, "delalloc"},<br>1504 {Opt_warn_on_error, "warn_on_error"},<br>1505 {Opt_nowarn_on_error, "nowarn_on_error"},<br>1506 {Opt_lazytime, "lazytime"},<br>1507 {Opt_nolazytime, "nolazytime"},<br>1508 {Opt_debug_want_extra_isize, "debug_want_extra_isize=%u"},<br>1509 {Opt_nodelalloc, "nodelalloc"},<br>1510 {Opt_removed, "mblk_io_submit"},<br>1511 {Opt_removed, "nomblk_io_submit"},<br>1512 {Opt_block_validity, "block_validity"},<br>1513 {Opt_noblock_validity, "noblock_validity"},<br>1514 {Opt_inode_readahead_blks, "inode_readahead_blks=%u"},<br>1515 {Opt_journal_ioprio, "journal_ioprio=%u"},<br>1516 {Opt_auto_da_alloc, "auto_da_alloc=%u"},<br>1517 {Opt_auto_da_alloc, "auto_da_alloc"},<br>1518 {Opt_noauto_da_alloc, "noauto_da_alloc"},<br>1519 {Opt_dioread_nolock, "dioread_nolock"},<br>1520 {Opt_dioread_lock, "dioread_lock"},<br>1521 {Opt_discard, "discard"},<br>1522 {Opt_nodiscard, "nodiscard"},<br>1523 {Opt_init_itable, "init_itable=%u"},<br>1524 {Opt_init_itable, "init_itable"},<br>1525 {Opt_noinit_itable, "noinit_itable"},<br>1526 {Opt_max_dir_size_kb, "max_dir_size_kb=%u"},<br>1527 {Opt_test_dummy_encryption, "test_dummy_encryption"},<br>1528 {Opt_nombcache, "nombcache"},<br>1529 {Opt_nombcache, "no_mbcache"}, /* for backward compatibility */<br>1530 {Opt_removed, "check=none"}, /* mount option from ext2/3 */<br>1531 {Opt_removed, "nocheck"}, /* mount option from ext2/3 */<br>1532 {Opt_removed, "reservation"}, /* mount option from ext2/3 */<br>1533 {Opt_removed, "noreservation"}, /* mount option from ext2/3 */<br>1534 {Opt_removed, "journal=%u"}, /* mount option from ext2/3 */<br>1535 {Opt_err, NULL},<br>1536 };</span><br><br></div><div>I'll also say that I agree with Rick's suggestion to just use filesystem permissions on the mounted filesystem itself if you're stuck on ext4, but, other people might have other use cases and need to know how to do this.</div><div><br></div><div>I feel like the omission of a umask option is a bug but the filesystem designers disagree.</div><div><br></div><div>There is also bindfs which can remount with a uid masking option for filesystems that do not support it but it's a workaround, it's a userspace filesystem driver so there -will- be performance impacts:</div><div><a href="https://help.ubuntu.com/community/Bindfs-SharedDirectoryLocalUsers">https://help.ubuntu.com/community/Bindfs-SharedDirectoryLocalUsers</a></div><div><br></div><div><br></div><div>-C<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 6, 2019 at 8:31 PM Rick Hornsby <<a href="mailto:richardjhornsby@gmail.com">richardjhornsby@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><br><div dir="ltr">On Mar 6, 2019, at 12:23, Chris Punches <<a href="mailto:punches.chris@gmail.com" target="_blank">punches.chris@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div dir="auto">Perms options are file system specific you'll need to research the options for your file system type</div></div></blockquote><div><br></div><div>Not really? Unless you’re diving into selinux or ACLs. Maybe there’s a filesystem out there that doesn’t support the user/group ownership and octal user/group/other permissions of typical *nix, but that would mean a huge mess of stuff would be different, not just those two things. In any case, I don’t think that would apply here.</div>...<br></div>_______________________________________________<br>
colug-432 mailing list<br>
<a href="mailto:colug-432@colug.net" target="_blank">colug-432@colug.net</a><br>
<a href="http://lists.colug.net/mailman/listinfo/colug-432" rel="noreferrer" target="_blank">http://lists.colug.net/mailman/listinfo/colug-432</a><br>
</blockquote></div></div></div></div></div></div>