On recent kernels (3.18.2 and up, and possibly some kernels on the 3.17 branch), unshare -r no longer works when run as an unprivileged user. It fails like this: $ unshare -r unshare: write failed /proc/self/gid_map: Operation not permitted It's fixed by these two upstream commits: https://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/sys-utils/unshare.c?id=0bf159413bdb9e324864a422b7aecb081e739119 https://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/sys-utils/unshare.c?id=fbceefded6645de693d576cd988a703a6f60d207 Can you backport those two commits? Thanks, Andy
unshare works after applying two patches mentioned above. 5e43af7e345310f734cbfb5a0bd6ee040cf178a7 (with changes to files other than unshare.1 removed) is also needed to get unshare.1 patch successfully applied.
Created attachment 1044099 [details] Backport patches to fix unshare on new kernels.
What about to update to f22? :-)
F22 uses util-linux 2.26.2, which already has the fix.
Will this problem be fixed? Or users needing this feature should upgrade to f22? I had a util-linux build with the same patches applied to fix the problem for f21, but I no longer maintain it because all of my systems has been upgraded to f22. https://copr.fedoraproject.org/coprs/lantw44/util-linux-unshare-f21/