one simple little test that i see differing results depending on kernel is 'mkfifo foo && ln foo bar'. Heres a test script that demos that, and output on precise, raring, saucy (no containers used).
== raring: 3.8.0-27-generic == $ ls -ld . drwxrwxrwt 5 root root 4096 Aug 21 19:16 . $ sudo rm -Rf lower upper mp $ mkdir lower upper mp $ sh -c 'echo hi > lower/f1.txt' $ sudo mount -t overlayfs -o lowerdir=/tmp/lower,upperdir=/tmp/upper overlay /tmp/mp $ sh -c 'cd mp && touch foo && ln foo bar' file link: user: PASS $ sudo sh -c 'cd mp && touch foo && ln foo bar' file link: root: PASS $ sh -c 'cd mp && mkfifo foo && ln foo bar' fifo link: user: PASS $ sudo sh -c 'cd mp && mkfifo foo && ln foo bar' fifo link: user: PASS
== saucy: 3.11.0-2-generic == $ ls -ld . drwxrwxrwt 17 root root 32768 Aug 21 15:17 . $ sudo rm -Rf lower upper mp [sudo] password for smoser: $ mkdir lower upper mp $ sh -c 'echo hi > lower/f1.txt' $ sudo mount -t overlayfs -o lowerdir=/tmp/lower,upperdir=/tmp/upper overlay /tmp/mp $ sh -c 'cd mp && touch foo && ln foo bar' file link: user: PASS $ sudo sh -c 'cd mp && touch foo && ln foo bar' file link: root: PASS $ sh -c 'cd mp && mkfifo foo && ln foo bar' fifo link: user: PASS $ sudo sh -c 'cd mp && mkfifo foo && ln foo bar' fifo link: user: PASS
== precise: 3.2.0-51-virtual == $ ls -ld . drwxrwxrwt 8 root root 4096 Aug 21 19:18 . $ sudo rm -Rf lower upper mp $ mkdir lower upper mp $ sh -c 'echo hi > lower/f1.txt' $ sudo mount -t overlayfs -o lowerdir=/tmp/lower,upperdir=/tmp/upper overlay /tmp/mp $ sh -c 'cd mp && touch foo && ln foo bar' file link: user: PASS $ sudo sh -c 'cd mp && touch foo && ln foo bar' file link: root: PASS $ sh -c 'cd mp && mkfifo foo && ln foo bar' ln: failed to create hard link `bar' => `foo': Operation not permitted fifo link: user: FAIL[1] $ sudo sh -c 'cd mp && mkfifo foo && ln foo bar' fifo link: user: PASS
one simple little test that i see differing results depending on kernel is 'mkfifo foo && ln foo bar'.
Heres a test script that demos that, and output on precise, raring, saucy (no containers used).
== raring: 3.8.0-27-generic == /tmp/lower, upperdir= /tmp/upper overlay /tmp/mp
$ ls -ld .
drwxrwxrwt 5 root root 4096 Aug 21 19:16 .
$ sudo rm -Rf lower upper mp
$ mkdir lower upper mp
$ sh -c 'echo hi > lower/f1.txt'
$ sudo mount -t overlayfs -o lowerdir=
$ sh -c 'cd mp && touch foo && ln foo bar'
file link: user: PASS
$ sudo sh -c 'cd mp && touch foo && ln foo bar'
file link: root: PASS
$ sh -c 'cd mp && mkfifo foo && ln foo bar'
fifo link: user: PASS
$ sudo sh -c 'cd mp && mkfifo foo && ln foo bar'
fifo link: user: PASS
== saucy: 3.11.0-2-generic == /tmp/lower, upperdir= /tmp/upper overlay /tmp/mp
$ ls -ld .
drwxrwxrwt 17 root root 32768 Aug 21 15:17 .
$ sudo rm -Rf lower upper mp
[sudo] password for smoser:
$ mkdir lower upper mp
$ sh -c 'echo hi > lower/f1.txt'
$ sudo mount -t overlayfs -o lowerdir=
$ sh -c 'cd mp && touch foo && ln foo bar'
file link: user: PASS
$ sudo sh -c 'cd mp && touch foo && ln foo bar'
file link: root: PASS
$ sh -c 'cd mp && mkfifo foo && ln foo bar'
fifo link: user: PASS
$ sudo sh -c 'cd mp && mkfifo foo && ln foo bar'
fifo link: user: PASS
== precise: 3.2.0-51-virtual == /tmp/lower, upperdir= /tmp/upper overlay /tmp/mp
$ ls -ld .
drwxrwxrwt 8 root root 4096 Aug 21 19:18 .
$ sudo rm -Rf lower upper mp
$ mkdir lower upper mp
$ sh -c 'echo hi > lower/f1.txt'
$ sudo mount -t overlayfs -o lowerdir=
$ sh -c 'cd mp && touch foo && ln foo bar'
file link: user: PASS
$ sudo sh -c 'cd mp && touch foo && ln foo bar'
file link: root: PASS
$ sh -c 'cd mp && mkfifo foo && ln foo bar'
ln: failed to create hard link `bar' => `foo': Operation not permitted
fifo link: user: FAIL[1]
$ sudo sh -c 'cd mp && mkfifo foo && ln foo bar'
fifo link: user: PASS