How to jail a process?

Hello people,

I'm creating a web game control panel, where people can manage their gameserver on a php made control panel.
But i have no idea how to create an jailed inviroment for the gameserver,
I've looked at possebilites for chroot, but i don't want the gameserver has any binaries of linux in it's directory.

What i'm looking for (Example):
Gameserver location: /home/gameservers/users/user873/
so all the gameserver files are in this path, but it needs to be jailed so if the gameserver is executing any kind of shell or trying to access any upper directory, it just get's denied!

Thanks in advance.

hmm, this is exactly what a "chroot" environment is for. Notice, that you do not have to put every binary there, just the absolute minimum. If there is no shell you do not need to deny access to it. Further, you put only copies of these binaries there, not the real ones. If a process manages to compromise these it is still jailed in its - now compromised - chroot environment.

I hope this helps.

bakunin