chroot - creating loopback device
I have setup a chroot jail with all the required utilities and want the user to be able to create and mount a loopback device. The block loop device is correct and all needed commands etc are in place (as far as I know)
I try the following:
$ losetup /dev/loop0 /home/jaileduser/data.crypt
memlock: Cannot allocate memory
Couldn't lock into memory, exiting.
So I check the memory allocation
$ ulimit -l
so I try:
$ulimit -l unlimited
but get the error:
ulimit: max locked memory: cannot modify limit: Operation not permitted
I guess to change the memlock value you need to be root but how can i modify this value for each chroot user or am I being mislead by the error and have forgotted something that I need to have this setup work?
Thanks in advance for any help