# Operation not permited during mkdir -p ...shm (jail)



## bryn1u (Sep 4, 2014)

Hey,

I want to create the shm folder and mount tmpfs(5) but I got error:

```
cat /etc/fstab.games
linproc /jails/Games/compat/linux/proc linprocfs rw 0 0
tmpfs /jails/Games/dev/shm tmpfs rw 0 0
```
Then

```
root@h0st:/jails/Games/dev # jail -c Games
jail: Games: mount.fstab: /jails/Games/dev/shm: No such file or directory
```
Then

```
root@h0st:/jails/Games/dev # mkdir -p /jails/Games/dev/shm
mkdir: /jails/Games/dev/shm: Operation not supported
```
I use ZFS:

```
root@h0st:/jails/Games/dev # zfs list
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
jails                                3.01G  1.69T   160K  /jails
jails/Games                          1.58G  1.69T  1.38G  /jails/Games
jails/Games/tmp                       176K  1.69T   176K  /jails/Games/tmp
jails/Games/usr                       199M  1.69T   198M  /jails/Games/usr
jails/Games/usr/home                  144K  1.69T   144K  /jails/Games/usr/home
jails/Games/usr/ports                 448K  1.69T   160K  /jails/Games/usr/ports
jails/Games/usr/ports/distfiles       144K  1.69T   144K  /jails/Games/usr/ports/distfiles
jails/Games/usr/ports/packages        144K  1.69T   144K  /jails/Games/usr/ports/packages
jails/Games/usr/src                   144K  1.69T   144K  /jails/Games/usr/src
jails/Games/var                      1.68M  1.69T   436K  /jails/Games/var
jails/Games/var/crash                 144K  1.69T   144K  /jails/Games/var/crash
jails/Games/var/db                    336K  1.69T   192K  /jails/Games/var/db
jails/Games/var/db/pkg                144K  1.69T   144K  /jails/Games/var/db/pkg
jails/Games/var/empty                 144K  1.69T   144K  /jails/Games/var/empty
jails/Games/var/log                   188K  1.69T   188K  /jails/Games/var/log
jails/Games/var/mail                  144K  1.69T   144K  /jails/Games/var/mail
jails/Games/var/run                   172K  1.69T   172K  /jails/Games/var/run
jails/Games/var/tmp                   152K  1.69T   152K  /jails/Games/var/tmp
```
Check chmods:

```
root@h0st:/jails/Games/dev # ls -lo /jails/Games/dev/
total 1
dr-xr-xr-x  2 root  wheel     -  512 Sep  4 16:23 fd
crw-rw-rw-  1 root  wheel     -  0xc Sep  4 16:33 null
dr-xr-xr-x  2 root  wheel     -  512 Sep  4 16:23 pts
crw-rw-rw-  1 root  wheel     - 0x10 Sep  4 16:21 random
lrwxr-xr-x  1 root  wheel     -    4 Sep  4 16:23 stderr -> fd/2
lrwxr-xr-x  1 root  wheel     -    4 Sep  4 16:23 stdin -> fd/0
lrwxr-xr-x  1 root  wheel     -    4 Sep  4 16:23 stdout -> fd/1
lrwxr-xr-x  1 root  wheel     -    6 Sep  4 16:23 urandom -> random
crw-rw-rw-  1 root  wheel     -  0xd Sep  4 16:20 zero
crw-rw-rw-  1 root  operator  - 0x96 Sep  4 16:21 zfs
root@h0st:/jails/Games/dev #
root@h0st:/jails/Games/dev # mkdir shm
mkdir: shm: Operation not supported
root@h0st:/jails/Games/dev #
```

Can someone help me?


----------



## SirDice (Sep 4, 2014)

The /dev/shm is a typical Linux construct, it doesn't exist on FreeBSD. If you want to make use of tmpfs(5) mount it on /tmp.


----------

