<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Yes, really.  It&#39;s in the mount manpage.  Sorry to RTFM but if you do you&#39;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&#39;re ultimately defined in each filesystem&#39;s <a href="https://github.com/torvalds/linux/tree/master/fs/ext4">drivers</a> and don&#39;t necessarily overlap (and often don&#39;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, &quot;bsddf&quot;},<br>1448         {Opt_minix_df, &quot;minixdf&quot;},<br>1449         {Opt_grpid, &quot;grpid&quot;},<br>1450         {Opt_grpid, &quot;bsdgroups&quot;},<br>1451         {Opt_nogrpid, &quot;nogrpid&quot;},<br>1452         {Opt_nogrpid, &quot;sysvgroups&quot;},<br>1453         {Opt_resgid, &quot;resgid=%u&quot;},<br>1454         {Opt_resuid, &quot;resuid=%u&quot;},<br>1455         {Opt_sb, &quot;sb=%u&quot;},<br>1456         {Opt_err_cont, &quot;errors=continue&quot;},<br>1457         {Opt_err_panic, &quot;errors=panic&quot;},<br>1458         {Opt_err_ro, &quot;errors=remount-ro&quot;},<br>1459         {Opt_nouid32, &quot;nouid32&quot;},<br>1460         {Opt_debug, &quot;debug&quot;},<br>1461         {Opt_removed, &quot;oldalloc&quot;},<br>1462         {Opt_removed, &quot;orlov&quot;},<br>1463         {Opt_user_xattr, &quot;user_xattr&quot;},<br>1464         {Opt_nouser_xattr, &quot;nouser_xattr&quot;},<br>1465         {Opt_acl, &quot;acl&quot;},<br>1466         {Opt_noacl, &quot;noacl&quot;},<br>1467         {Opt_noload, &quot;norecovery&quot;},<br>1468         {Opt_noload, &quot;noload&quot;},<br>1469         {Opt_removed, &quot;nobh&quot;},<br>1470         {Opt_removed, &quot;bh&quot;},<br>1471         {Opt_commit, &quot;commit=%u&quot;},<br>1472         {Opt_min_batch_time, &quot;min_batch_time=%u&quot;},<br>1473         {Opt_max_batch_time, &quot;max_batch_time=%u&quot;},<br>1474         {Opt_journal_dev, &quot;journal_dev=%u&quot;},<br>1475         {Opt_journal_path, &quot;journal_path=%s&quot;},<br>1476         {Opt_journal_checksum, &quot;journal_checksum&quot;},<br>1477         {Opt_nojournal_checksum, &quot;nojournal_checksum&quot;},<br>1478         {Opt_journal_async_commit, &quot;journal_async_commit&quot;},<br>1479         {Opt_abort, &quot;abort&quot;},<br>1480         {Opt_data_journal, &quot;data=journal&quot;},<br>1481         {Opt_data_ordered, &quot;data=ordered&quot;},<br>1482         {Opt_data_writeback, &quot;data=writeback&quot;},<br>1483         {Opt_data_err_abort, &quot;data_err=abort&quot;},<br>1484         {Opt_data_err_ignore, &quot;data_err=ignore&quot;},<br>1485         {Opt_offusrjquota, &quot;usrjquota=&quot;},<br>1486         {Opt_usrjquota, &quot;usrjquota=%s&quot;},<br>1487         {Opt_offgrpjquota, &quot;grpjquota=&quot;},<br>1488         {Opt_grpjquota, &quot;grpjquota=%s&quot;},<br>1489         {Opt_jqfmt_vfsold, &quot;jqfmt=vfsold&quot;},<br>1490         {Opt_jqfmt_vfsv0, &quot;jqfmt=vfsv0&quot;},<br>1491         {Opt_jqfmt_vfsv1, &quot;jqfmt=vfsv1&quot;},<br>1492         {Opt_grpquota, &quot;grpquota&quot;},<br>1493         {Opt_noquota, &quot;noquota&quot;},<br>1494         {Opt_quota, &quot;quota&quot;},<br>1495         {Opt_usrquota, &quot;usrquota&quot;},<br>1496         {Opt_prjquota, &quot;prjquota&quot;},<br>1497         {Opt_barrier, &quot;barrier=%u&quot;},<br>1498         {Opt_barrier, &quot;barrier&quot;},<br>1499         {Opt_nobarrier, &quot;nobarrier&quot;},<br>1500         {Opt_i_version, &quot;i_version&quot;},<br>1501         {Opt_dax, &quot;dax&quot;},<br>1502         {Opt_stripe, &quot;stripe=%u&quot;},<br>1503         {Opt_delalloc, &quot;delalloc&quot;},<br>1504         {Opt_warn_on_error, &quot;warn_on_error&quot;},<br>1505         {Opt_nowarn_on_error, &quot;nowarn_on_error&quot;},<br>1506         {Opt_lazytime, &quot;lazytime&quot;},<br>1507         {Opt_nolazytime, &quot;nolazytime&quot;},<br>1508         {Opt_debug_want_extra_isize, &quot;debug_want_extra_isize=%u&quot;},<br>1509         {Opt_nodelalloc, &quot;nodelalloc&quot;},<br>1510         {Opt_removed, &quot;mblk_io_submit&quot;},<br>1511         {Opt_removed, &quot;nomblk_io_submit&quot;},<br>1512         {Opt_block_validity, &quot;block_validity&quot;},<br>1513         {Opt_noblock_validity, &quot;noblock_validity&quot;},<br>1514         {Opt_inode_readahead_blks, &quot;inode_readahead_blks=%u&quot;},<br>1515         {Opt_journal_ioprio, &quot;journal_ioprio=%u&quot;},<br>1516         {Opt_auto_da_alloc, &quot;auto_da_alloc=%u&quot;},<br>1517         {Opt_auto_da_alloc, &quot;auto_da_alloc&quot;},<br>1518         {Opt_noauto_da_alloc, &quot;noauto_da_alloc&quot;},<br>1519         {Opt_dioread_nolock, &quot;dioread_nolock&quot;},<br>1520         {Opt_dioread_lock, &quot;dioread_lock&quot;},<br>1521         {Opt_discard, &quot;discard&quot;},<br>1522         {Opt_nodiscard, &quot;nodiscard&quot;},<br>1523         {Opt_init_itable, &quot;init_itable=%u&quot;},<br>1524         {Opt_init_itable, &quot;init_itable&quot;},<br>1525         {Opt_noinit_itable, &quot;noinit_itable&quot;},<br>1526         {Opt_max_dir_size_kb, &quot;max_dir_size_kb=%u&quot;},<br>1527         {Opt_test_dummy_encryption, &quot;test_dummy_encryption&quot;},<br>1528         {Opt_nombcache, &quot;nombcache&quot;},<br>1529         {Opt_nombcache, &quot;no_mbcache&quot;},  /* for backward compatibility */<br>1530         {Opt_removed, &quot;check=none&quot;},    /* mount option from ext2/3 */<br>1531         {Opt_removed, &quot;nocheck&quot;},       /* mount option from ext2/3 */<br>1532         {Opt_removed, &quot;reservation&quot;},   /* mount option from ext2/3 */<br>1533         {Opt_removed, &quot;noreservation&quot;}, /* mount option from ext2/3 */<br>1534         {Opt_removed, &quot;journal=%u&quot;},    /* mount option from ext2/3 */<br>1535         {Opt_err, NULL},<br>1536 };</span><br><br></div><div>I&#39;ll also say that I agree with Rick&#39;s suggestion to just use filesystem permissions on the mounted filesystem itself if you&#39;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&#39;s a workaround, it&#39;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 &lt;<a href="mailto:richardjhornsby@gmail.com">richardjhornsby@gmail.com</a>&gt; 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 &lt;<a href="mailto:punches.chris@gmail.com" target="_blank">punches.chris@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div dir="auto">Perms options are file system specific you&#39;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>