]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: describe how to reverse systemd-nspawn -U 4319/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 9 Oct 2016 15:48:01 +0000 (11:48 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 9 Oct 2016 22:24:56 +0000 (18:24 -0400)
Now that systemd-nspawn@.service includes -U, more users might be interested
in this tidbit ;)

man/systemd-nspawn.xml

index bf3860604c25c18585b9ad5bea2b98d60d59d6eb..4439d554a7cdb2695a3003d84f18c3d76b582c77 100644 (file)
         except in the file ownership of the files and directories of the container.</para></listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term><option>-U</option></term>
-
-        <listitem><para>If the kernel supports the user namespaces feature, equivalent to
-        <option>--private-users=pick</option>, otherwise equivalent to
-        <option>--private-users=no</option>.</para>
-
-        <para>Note that <option>-U</option> is the default if the <filename>systemd-nspawn@.service</filename> template unit
-        file is used.</para></listitem>
-      </varlistentry>
-
       <varlistentry>
         <term><option>--private-users-chown</option></term>
 
         user namespacing is not used.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>-U</option></term>
+
+        <listitem><para>If the kernel supports the user namespaces feature, equivalent to
+        <option>--private-users=pick --private-users-chown</option>, otherwise equivalent to
+        <option>--private-users=no</option>.</para>
+
+        <para>Note that <option>-U</option> is the default if the
+        <filename>systemd-nspawn@.service</filename> template unit file is used.</para>
+
+        <para>Note: it is possible to undo the effect of <option>--private-users-chown</option> (or
+        <option>-U</option>) on the file system by redoing the operation with the first UID of 0:</para>
+
+        <programlisting>systemd-nspawn … --private-users=0 --private-users-chown</programlisting>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>--private-network</option></term>