<?xml version="1.0"?>
<?xml-stylesheet href="/transform" type="text/xsl"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bs="http://purl.org/ontology/bibo/status/" xmlns:ci="https://vocab.methodandstructure.com/content-inventory#" xmlns:dct="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xhv="http://www.w3.org/1999/xhtml/vocab#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" lang="en" prefix="bibo: http://purl.org/ontology/bibo/ bs: http://purl.org/ontology/bibo/status/ ci: https://vocab.methodandstructure.com/content-inventory# dct: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# xhv: http://www.w3.org/1999/xhtml/vocab# xsd: http://www.w3.org/2001/XMLSchema#" vocab="http://www.w3.org/1999/xhtml/vocab#" xml:lang="en">
  <head>
    <title property="dct:title">Networked Follysystem</title>
    <base href="https://doriantaylor.com/networked-follysystem"/>
    <link href="document-stats#En877BvbK4hAyJrPm33k2L" rev="ci:document"/>
    <link href="elsewhere" rel="alternate bookmark" title="Elsewhere"/>
    <link href="this-site" rel="alternate index" title="This Site"/>
    <link href="http://purl.org/ontology/bibo/status/published" rel="bibo:status"/>
    <link href="" rel="ci:canonical" title="Networked Follysystem"/>
    <link href="lexicon/#EzqXIsriaILFcWjXdS7FbI" rel="dct:audience" title="Software Developer"/>
    <link href="person/dorian-taylor#me" rel="dct:creator" title="Dorian Taylor"/>
    <link href="//www.doriantaylor.com/file/dns-comic-can-i-have-some-booze" rel="foaf:depiction"/>
    <link href="person/dorian-taylor" rel="meta" title="Who I Am"/>
    <link about="./" href="3f36c30c-6096-454a-8a22-c062100ae41f" rel="alternate" type="application/atom+xml"/>
    <link about="./" href="f07f5044-01bc-472d-9079-9b07771b731c" rel="alternate" type="application/atom+xml"/>
    <link about="./" href="this-site" rel="alternate"/>
    <link about="./" href="elsewhere" rel="alternate"/>
    <link about="./" href="e341ca62-0387-4cea-b69a-cdabc7656871" rel="alternate" type="application/atom+xml"/>
    <link about="verso/" href="3f36c30c-6096-454a-8a22-c062100ae41f" rel="alternate" type="application/atom+xml"/>
    <link about="verso/" href="this-site" rel="alternate"/>
    <link about="verso/" href="elsewhere" rel="alternate"/>
    <meta content="networked-follysystem" datatype="xsd:token" property="ci:canonical-slug"/>
    <meta content="Last Friday I tempted fate by changing my work setup. Let's just say I learned a lot about the state of the art of networked file systems." name="description" property="dct:abstract"/>
    <meta content="2021-01-27T20:00:44+00:00" datatype="xsd:dateTime" property="dct:created"/>
    <meta content="2021-01-27T20:00:56+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2021-01-29T17:26:33+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2022-05-31T15:10:50+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta about="person/dorian-taylor#me" content="Dorian Taylor" name="author" property="foaf:name"/>
    <meta content="summary_large_image" name="twitter:card"/>
    <meta content="@doriantaylor" name="twitter:site"/>
    <meta content="Networked Follysystem" name="twitter:title"/>
    <meta content="Last Friday I tempted fate by changing my work setup. Let's just say I learned a lot about the state of the art of networked file systems." name="twitter:description"/>
    <meta content="https://www.doriantaylor.com/file/dns-comic-can-i-have-some-booze" name="twitter:image"/>
    <object>
      <nav>
        <ul>
          <li>
            <a href="//dorian.substack.com/p/what-a-difference-a-week-makes" rev="dct:references" typeof="bibo:Article">
              <span property="dct:title">What A Difference A Week Makes</span>
            </a>
          </li>
          <li>
            <a href="document-stats#En877BvbK4hAyJrPm33k2L" rev="ci:document" typeof="qb:Observation">
              <span>urn:uuid:9fcefb06-f6ca-4e21-b032-26b3e6df7936</span>
            </a>
          </li>
        </ul>
      </nav>
    </object>
  </head>
  <body about="" id="E6I70FsXs_Kf4oSKiocLoL" typeof="bibo:Article">
    <p>On January 22, 2021, ten years to the day after installing it&#x2014;a coincidence&#x2014;I tried to get rid of <a href="https://www.openafs.org/" rel="dct:references">OpenAFS</a>. It did not go well.</p>
    <p>Perhaps I'll preface: I am a staunch supporter of keeping residual computing and data storage resources on-premises. As onlookers have remarked over the years, I have operated my very own <q>cloud</q> since around 1998, and I don't expect to change that policy anytime in the foreseeable future.</p>
    <p>At the centre of this pattern of work is a <em>server</em> where all your stuff goes&#x2014;<a href="https://www.ubuntu.com/" rel="dct:references">almost always a Linux</a> but there was some <a href="https://www.freebsd.org/" rel="dct:references">FreeBSD</a> and even <a href="https://www.openbsd.org/" rel="dct:references">OpenBSD</a> thrown in there earlier on&#x2014;and then you connect to that nice, stable, sedentary place with your workstation, or laptop, or phone or whatever, whenever, wherever you are.</p>
    <p>As with all things cloudy, the actual device in your hands is just a control surface for information somewhere else. Not only does this make them much less of a problem if they are lost or stolen, but it also makes all devices effectively interchangeable: I can, <em>and have</em>, in a pinch, borrowed a grandparent's <a href="https://en.wikipedia.org/wiki/Macintosh_Performa" rel="dct:references">Mac Performa</a> to get some urgent work done.</p>
    <p>Of course, wherever there are computers, there are files, and the question arises: how do you get files on and off these control-surface devices? Moreover, how to do it when the parts are heterogeneous? Indeed, at one job back in 2004, I had a Mac laptop, a Windows XP workstation, and a <a href="https://www.debian.org/" rel="dct:references">Debian</a> 4U rack-mount server under my desk. The <span class="parenthesis" title="aside from SSH of course, and maybe the occasional WebDAV dropbox">only viable answer</span>, for schlepping files betwixt, was <a href="https://www.samba.org/" rel="dct:references">Samba</a>.</p>
    <p>Samba, of course, is the salsified, reverse-engineered Linux/Unix implementation of Windows file sharing, also known as <a href="https://en.wikipedia.org/wiki/Server_Message_Block" rel="dct:references"><dfn>Server Message Block</dfn></a>. <abbr>SMB</abbr> is ubiquitous because Windows is ubiquitous: <em>everything</em> ships with it.</p>
    <section id="EEsYr4ApGn_JwlKzH_Xb9L">
      <h2>January 22, 2011</h2>
      <p>At some point on this fateful day, one of the disks on my <abbr>RAID</abbr> 1 died. No matter, I thought, and went and bought a matching drive to replace the dead one. As the <abbr>RAID</abbr> was rebuilding, it became clear, for reasons that are lost to time, that the file system <em>itself</em> was corrupt, resulting in the permanent loss of a random subset of files on a certain region of the disk, a few of which I didn't have backups for.</p>
      <aside role="note" id="E1HU71g88JP7EtAqk6oMEL">
        <p>Remember kids, a <abbr>RAID</abbr> is not a backup solution; it is a fault tolerance solution. And honestly barely worth bothering with anymore.</p>
      </aside>
      <p>Heretofore, I had been following my regular pattern of using <a href="https://www.debian.org/" rel="dct:references">Debian</a> (now <a href="https://www.ubuntu.com/" rel="dct:references">Ubuntu</a>) as my main workspace, and <code>$WHATEVER</code> as a front-end, which at the time meant my Mac Mini. Naturally, <span class="parenthesis" title="and SSH/rsync">I used Samba</span> to schlep files back and forth. What I found was, whenever there was even the slightest network interruption, the file share would drop. Worse, if I ever restarted the server while a share was connected, it would hang on the Mac, incapable of being rehabilitated short of a hold-down-the-power-button restart. I remember reading that <a href="https://en.wikipedia.org/wiki/Andrew_File_System" rel="dct:references"><abbr>AFS</abbr></a> was specifically designed to work around service interruptions&#x2731;, and since I had all the floorboards torn up <em>and</em> I had a hankering to try Kerberos for some other stuff, I figured why not give <abbr>AFS</abbr> a shot.</p>
      <aside role="note" id="E9NEUOg8bw0i-4rLW5KjbK">
        <p>&#x2731;&#x2009;The actual performance under service interruptions is&#x2026;<em>okay</em>. Not what was advertised. Minor hiccups are virtually unnoticeable, but throughput <span class="parenthesis" title="annoying!!!">hangs indefinitely when your authentication tokens expire</span>. <em>However</em>, I can open a file on my local network, make a bunch of unsaved changes, close my laptop, go to a coffee shop or the library or whatever, <abbr>VPN</abbr> back home, hit <em>save</em>, and it will work. No need to reconnect or anything. That is actually pretty cool.</p>
      </aside>
      <p>Ten years later, I tried to get rid of it. Fun fact: I know it was <em>exactly</em> ten years because I caught a journal entry dated <time>January 22, 2011</time> whizz by when I was refreshing my backup on <time>January 22, 2021</time>, in preparation for the teardown.</p>
    </section>
    <section id="Ez1bCVUR4Ymkbeh3KJLYAI">
      <h2>(Open)<abbr>AFS</abbr> Has Its Idiosyncrasies</h2>
      <p>If you want to run an <abbr>AFS</abbr> server, it comes in one flavour: <a href="https://www.openafs.org/" rel="dct:references">OpenAFS</a>. The genuine article, <a href="https://www.auristor.com/" rel="dct:references">or one of its derivative works</a>, is the only viable, up-to-date, production-ready implementation. It is a <em>weird</em> piece of software, that doesn't look like most server software you see on Linux, <span class="parenthesis" title="via the acquisition of Transarc">because it comes from <abbr>IBM</abbr></span>, before Linux was even really a thing.</p>
      <p>In my decade as an (Open)<abbr>AFS</abbr> user, I have noticed some&#x2026;<em>concerns</em>. I have divided my concerns into the <abbr>AFS</abbr> <strong>(P)</strong>rotocol in general and the OpenAFS <strong>(I)</strong>mplementation in particular.</p>
      <dl>
        <dt>(P) <abbr>AFS</abbr> requires Kerberos</dt>
        <dd>The enterprise authentication infrastructure <a href="http://web.mit.edu/kerberos/" rel="dct:references">Kerberos</a> depends on razor-sharp domain knowledge and is <span class="parenthesis" title="no thanks to its notoriously awful error messaging">a lot of work to set up</span>. While most networked file systems <em>support</em> Kerberos, you can't even <em>consider</em> <abbr>AFS</abbr> prior to installing it.</dd>
        <dt>(I) OpenAFS requires its own special drive partitions</dt>
        <dd><abbr>AFS</abbr> uses a different access control model than <abbr>POSIX</abbr>, so while you could <em>theoretically</em> run it on top of one of <span class="parenthesis" title="ZFS, BTRFS, etc.; you would need storage pools and extended attributes">the newer-generation file systems</span>, <span class="parenthesis" title="no doubt on account of those file systems not existing at the time">this is not how they did it with OpenAFS</span>. You have to create a special partition that you can <em>only</em> access via <abbr>AFS</abbr>, and get this: it <em>must</em> be mounted at the root <span class="parenthesis" title="and the next one is /vicepb, then /vicepc, etc.">with the name <code>/vicepa</code></span>.</dd>
        <dt>(I) OpenAFS is only accessible as a network resource</dt>
        <dd>There is no <q>local</q> way to access files in OpenAFS, even when it is hosted on the same computer. You can only access it over a <abbr>UDP</abbr> socket. Bonus: you have to tune the packet size down if you want to access the cell over a <abbr>VPN</abbr>, or file transfers will mysteriously choke.</dd>
        <dt>(I) OpenAFS is slow</dt>
        <dd>The fact that OpenAFS runs on its own bespoke drive partitions that you can only access over <abbr>UDP</abbr> <span class="parenthesis" title="all that extra overhead also runs the system load up like crazy">makes it really, <em>really</em> slow</span>.</dd>
        <dt>(I) There are <em>so</em> many commands to wrangle</dt>
        <dd>In addition to the ordinary multiuser file management concepts, there are: <dfn>cells</dfn>, <dfn>hosts</dfn>, <dfn>partitions</dfn>, <dfn>volumes</dfn>, and <abbr>ACLs</abbr>, which each have their own special command with about two dozen subcommands apiece. You can't use ordinary Unix file system maintenance commands, you have to use the special <abbr>AFS</abbr> ones.</dd>
        <dt>(P) <abbr>AFS</abbr> requires extra client software</dt>
        <dd>Naturally, nothing ships with <abbr>AFS</abbr> support. If you want it on Linux, you have to compile kernel modules, which means routine updates take a <em>lot</em> longer than otherwise, whenever either the kernel or the <abbr>AFS</abbr> module is updated, which is frequently. Also, <a href="https://www.auristor.com/" rel="dct:references">Auristor</a> on MacOS has had a couple <em>really</em> nasty kernel-panicking and/or data-destroying bugs over the last few years, but they're the only game in town for connecting a Mac to <abbr>AFS</abbr>. Don't ask me what the situation is for Windows, let alone phones or tablets.</dd>
        <dt>(P) Services that access <abbr>AFS</abbr> cells have to be wrapped in <a href="https://docs.openafs.org/Reference/1/pagsh.html" rel="dct:references"><code>pagsh</code></a></dt>
        <dd>This basically reduces to a bunch of extra administrative overhead: minting additional <dfn>service principals</dfn> in Kerberos, fussing with <dfn>keytabs</dfn>, and rewriting <dfn>init scripts</dfn> that have an even chance of being clobbered whenever you update. I never actually got <code>pagsh</code> to work.</dd>
        <dt>(P) Transport security is weak</dt>
        <dd>Like, weak to the point of being essentially nonexistent. Anybody who really wanted to could see any file you're sending over the network.</dd>
        <dt>(P) <abbr>AFS</abbr> tokens are not the same as Kerberos tickets</dt>
        <dd>Kerberos tickets <span class="parenthesis" title="which is often a file but not necessarily">live in a cache</span>; <abbr>AFS</abbr> tokens live in the kernel. The latter are subordinate to and perform basically the same function as the former, but are somehow different, and this causes problems because you have to remember to manage tokens as well as tickets.</dd>
        <dt>(I) Ticket/token autorenewal is unreliable</dt>
        <dd>This depends on the client implementation, but whatever mechanism that keeps your tickets/tokens fresh is bound to fall out of sync, especially when it hits the hard maximum Kerberos ticket lifetime. The net effect is you lose access to <abbr>AFS</abbr> when the token expires, which is terrifically frustrating, especially if it happens in the middle of a long-running process.</dd>
      </dl>
      <p>These accumulated annoyances led me to decide it was finally time to give up <abbr>AFS</abbr> for something more mainstream&#x2014;something like <em>Samba</em>.</p>
    </section>
    <section id="EEwFubL_zZoUYguVXHGvjI">
      <h2>Samba Surprise!</h2>
      <p>My recollection of Windows networking in general, and Samba in particular, is that it is a relatively Mickey-Mouse protocol whose implementation is nevertheless fairly easy to configure, and <em>literally everything supports it</em>. <span class="parenthesis" title="although SMB didn't get transport encryption until 3.0 in 2012, and proper POSIX extensions until 2015">It has since grown up</span> to become a robust and <span class="parenthesis" title="?">efficient</span> networked file protocol with nice features like strong encryption and authentication, especially with Kerberos. Apple, furthermore, ditched <a href="https://en.wikipedia.org/wiki/Apple_Filing_Protocol" rel="dct:references">their own <abbr>AFP</abbr></a> in favour of <abbr>SMB</abbr>&#x2731;, making it ostensibly the <q>Common Internet File System</q> Microsoft originally hoped it would.</p>
      <aside role="note" id="Ez6gnWI9Ejd5JKCvHxi83K">
        <p>&#x2731;&#x2009;I will get to this.</p>
      </aside>
      <p>I figured Samba <em>must</em> have matured considerably in the last decade, given that they now have <a href="https://wiki.samba.org/index.php/Active_Directory_Domain_Controller" rel="dct:references">a drop-in replacement</a> for Windows <a href="https://en.wikipedia.org/wiki/Active_Directory" rel="dct:references">Active Directory</a>&#x2014;a snarl of protocols and databases that make corporate office networks <em>Just Work&#x2122;</em>. I was further emboldened by Apple's move&#x2731;, figuring <abbr>SMB</abbr> couldn't be all that bad anymore. At any rate, the idea that I wouldn't have to go around configuring clients was <em>very</em> alluring.</p>
      <aside role="note" id="E4_4EXZGHyQKOZNBDeVnTL">
        <p>&#x2731;&#x2009;I <strong>said</strong> I will get to this.</p>
      </aside>
      <p>I thus resolved to set myself up a Kerberos-authenticated Samba. The path of least resistance looked like spinning up some portion of its Active Directory functionality.</p>
      <section id="ElQuaDh7WQJ_BHHsZFCdmJ">
        <h3>Surprise #1</h3>
        <p>What wasn't clear at the outset was that the Samba Active Directory implementation kinda duct-tapes together its own Kerberos, <abbr>LDAP</abbr>, and <abbr>DNS</abbr> services. Well guess what: <strong>I already <em>have</em> Kerberos, <abbr>LDAP</abbr>, and <abbr>DNS</abbr> services running on my network.</strong> On the same <em>machine</em>, even. And I'm using them for stuff. Blowing them away for the sake of Samba's funky <abbr>AD</abbr> thingamajig is out of the question.</p>
        <p>Now, this didn't answer the question for me if I could just connect to plain Samba via Kerberos, because it wasn't obvious in the documentation that I could. I didn't find out because I was surprised by something else&#x2026;</p>
      </section>
      <section id="EJS7Bueb2Ogv7eGVKnUU_K">
        <h3>Surprise #2</h3>
        <p>As I was fiddling around trying to get Samba to work with Kerberos without having to haul in the Active Directory stuff, I figured I would try to get it working first <span class="parenthesis" title="Fun fact: SMB authentication is tightly coupled to LanMan hashes, so you actually have to maintain a second password file just for Samba."><em>without</em> Kerberos, just because.</span></p>
        <p><em>It turns out</em> that Samba out of the box makes the Unix permissions on all the files show up wrong. Why? Because it's trying to map them to <abbr>DOS</abbr> permissions somehow. Well how in the hell are they going to service the growing non-Windows world if all they have on offer is <abbr>DOS</abbr> permissions?</p>
        <p>Wait, okay, there is a configuration parameter <code>unix extensions = yes</code> and a few others that shove the <abbr>DOS</abbr> permissions into extended file system attributes, <span class="parenthesis" title="this turns out to be enabled by default anyway">but that has no effect</span>. I finally mount the share on Linux and determine that it's actually the Mac <em>client</em> that's not cooperating. <strong>Hmmmm&#x2026;</strong>. After slogging through StackOverflow some, I <a href="https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X" rel="dct:references">trip over a wiki document</a> and <a href="https://lists.samba.org/archive/samba/2019-April/222514.html" rel="dct:references">concomitant mailing list exchange</a> that yields a number of obscure configuration parameters specific to satiating Apple <abbr>SMB</abbr> clients. I copy and paste those into the config, restart the service, and everything on my Mac appears to be fine.</p>
        <p>Except it isn't fine.</p>
        <p>None of my symlinks are showing up as symlinks; they're showing up as <em>files</em>. What the hell? I could have sworn Samba supported symlinks. How the heck did <em>Apple</em> handle this? They ditched Finder aliases for proper <abbr>POSIX</abbr> symlinks <em>decades</em> ago. There is <em>no</em> way they would have switched to <abbr>SMB</abbr> without solving this problem.</p>
        <p><em>Well it turns out</em>, Apple solved the symlink problem <a href="https://appleinsider.com/articles/13/06/11/apple-shifts-from-afp-file-sharing-to-smb2-in-os-x-109-mavericks" rel="dct:references">by ditching Samba altogether in <time>2013</time></a>, when the latter changed their licensing terms. <em>That's</em> how they solved it: they rolled their own. (I <em>told</em> you I'd get to this!)</p>
        <p>What about those symlinks, anyway? <em>Well it turns out</em>, that what Samba <em>means</em> by <q>symlink</q> is actually two distinct things. There are ordinary <abbr>POSIX</abbr> symlinks, and then there are <a href="https://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks" rel="dct:references">these weird ersatz objects</a> that show up as symlinks over the <em>network</em>, but on the <em>local</em> file system are plain text files&#x2731;. <q>Real</q> symlinks are still represented to <abbr>SMB</abbr> clients as regular files and directories, meaning funny things will happen if you try to move them around.</p>
        <aside role="note" id="EJr3fKrpXISf5zUD_7kclI">
          <p>&#x2731;&#x2009;I mean, so are <abbr>POSIX</abbr> symlinks under the hood, but they get marked as such at the file system level.</p>
        </aside>
        <p>What I <em>want</em>, is a faithful representation of the <em>important</em> subset of my server's file system, accessible to other machines on my network, <span class="parenthesis" title="to say nothing of hard links">including all permissions and symlinks</span>. Version 3 of the <abbr>SMB</abbr> protocol itself, <em>does</em> support proper <abbr>POSIX</abbr> semantics, but <a href="https://lists.samba.org/archive/samba/2021-January/234076.html" rel="dct:references">the Samba team doesn't consider it a priority</a>. There <em>is</em> experimental code, but you have to enable it explicitly at compile time, and I don't feel like maintaining that. Moreover, I never got my answer with respect to Kerberized <abbr>SMB</abbr> without the Active Directory dog-and-pony show, and I <em>know</em> it still disconnects at the slightest network hiccup.</p>
        <p>I guess I never knew how good I had it with OpenAFS.</p>
      </section>
    </section>
    <section id="E0GW_NGUVBVSpGNdOCpmQK">
      <h2>Coda (No, Not <a href="http://coda.cs.cmu.edu/" rel="dct:references"><em>That</em> Coda</a>)</h2>
      <p>This quixotic excursion took me from the afternoon of <time datetime="2021-01-22">January 22nd</time>, to the morning of the <time datetime="2021-01-26">26th</time>, while taking the weekend off. That was <em>entirely</em> too much effort to end up <span class="parenthesis" title="I also ended up encrypting the AFS drive, which is probably just gonna make it even slower.">more or less back where I started&#x2014;well, I guess I learned some stuff.</span></p>
      <p>Most of the time was wrapped up in copying hundreds of gigabytes of files out of, and then back <em>into</em> <abbr>AFS</abbr>, poring over documentation, and interacting with the Samba mailing list. <a href="https://twitch.tv/doriantaylor" rel="dct:references">I even streamed some of the process</a>, but as soon as I realized it would be even <em>more</em> boring than my usual transmissions, I promptly shut it off.</p>
      <p>This story isn't quite over yet. Again, what I <em>want</em> is a <q><abbr>POSIX</abbr>-enough</q> file system, accessible over a network. Moreover, for the purpose of performance, backups, <code>mmap()</code>-able databases in project directories, etc., I want a properly-<em>local</em> file system, physically <em>on</em> the server, which is <em>exported</em> to the network. I want any manipulations to that file system by any network client to be faithfully represented on the server's local file system. I want it to be <em>relatively</em> robust to network outages&#x2014;at least no worse than <abbr>AFS</abbr> is. Bonus if I can reuse my existing Kerberos setup.</p>
      <p>As such, I have my eyes on <a href="https://en.wikipedia.org/wiki/Network_File_System#NFSv4" rel="dct:references"><abbr>NFS</abbr> version 4</a>, which looked initially like it only authenticated&#x2014;even under Kerberos&#x2014;at the host-to-host level, but it <em>seems</em> like you can actually authenticate with any <dfn>principal</dfn> you like. This is good, if the advertisements are accurate. It means that <a href="http://dfusion.com.au/wiki/tiki-index.php?page=Why+NFSv4+UID+mapping+breaks+with+AUTH_UNIX" rel="dct:references">the infamous <abbr>UID</abbr>/<abbr>GID</abbr> mapping problem</a> that typically makes <abbr>NFS</abbr> a non-starter, is taken care of by Kerberos.</p>
      <aside role="note" id="Ewk7IyISRZXpSzhwZ6OYXL">
        <p>What it <em>says</em> happens is the Kerberos <dfn>principal</dfn> is resolved to a user name on the server, and from there it gets the <abbr>UID</abbr>/<abbr>GID</abbr>, and from <em>there</em> it can correctly administer permissions. I haven't gotten this to work yet, but holy cow what a game-changer if it does.</p>
      </aside>
      <p>If <abbr>NFSv4</abbr> ends up working, I will once again say adieu to OpenAFS&#x2014;<em>you gloriously weird, misshapen product</em>&#x2014;and probably run Samba on the side, for my phone or whatever.</p>
      <aside role="note" id="EI6M07eLbLbuvMzUPVh3vK">
        <p>Another product worth mentioning: <abbr>CIFSD</abbr>. It's a bleeding-edge Linux kernel-space <abbr>SMB</abbr> server, analogous to the <abbr>NFS</abbr> one. Based on the commit logs, it <em>appears</em> to support the <abbr>SMB</abbr> 3.1.1 <abbr>POSIX</abbr> extensions <em>and</em> Kerberos <em>and</em> strong transport encryption, so it could very soon be a viable candidate.</p>
      </aside>
      <p>I don't know how you can really do this stuff without just diving into it. When I started this little adventure, <em>sure</em> I had a bunch of wrong assumptions, but it isn't clear that I would have dispelled those assumptions with any less effort than crashing headlong into them. <em>Maybe</em> if I had pored over the entirety of the Samba documentation before getting started? <em>Maybe</em> if I had read every one of the <abbr>SMB</abbr> specifications? I doubt it: documents like those are of the scanning variety, and you can glaze right over something important if you aren't specifically looking for it. But more to the point: it would have taken longer to read all that documentation cover to cover than just jumping in and trying stuff, and a good measure of it probably would have been wrong anyway.</p>
      <p><em>Maybe</em> I would have tipped myself off if I had thought to read up on Apple's departure from <abbr>AFP</abbr>&#x2014;and subsequently Samba, and rolling their own <abbr>SMB</abbr> implementation? Even if I had tried to set up my Kerberized Samba <em>before</em> nuking <abbr>AFS</abbr>&#x2014;which I was going to do anyway to introduce encryption on the underlying drive&#x2014;it isn't clear that I would have caught the symlink issue in a testing environment, because it wouldn't have occurred to me to explicitly test it. In short, I would have ended up right where I did. It would have taken twenty hours any way you slice it.</p>
      <p>Anyway, back to work.</p>
    </section>
  </body>
</html>
