setup php to run in chroot/jail

Started by aicon, January 27, 2017, 07:37:08 PM

Previous topic - Next topic

aicon

Can anyone help me in how to setup php to run in chroot/jail?
I need to separate the customers and increase the server security.
Recently from php with scandir the customers or hackers if somewhere the site was hacked can view/modify the major part of directories in CWP.
I want to jail each cutomer to its directory.
Thx
In case anyone wants $10 bonus for FREE on cheap cloud VPS from Vultr:
http://www.vultr.com/?ref=6855695
-------------------------------------------------------------------------------------------------
And $10 bonus for FREE on cheap cloud VPS from Digitalocean:
https://www.digitalocean.com/?refcode=c41029801394

Sandeep

cwp uses suphp which is high in security . To increase the security of the PHP script always update the script to latest

aicon

I know that, but does not isolate the customers directories.
This is what I'm looking for.
In case anyone wants $10 bonus for FREE on cheap cloud VPS from Vultr:
http://www.vultr.com/?ref=6855695
-------------------------------------------------------------------------------------------------
And $10 bonus for FREE on cheap cloud VPS from Digitalocean:
https://www.digitalocean.com/?refcode=c41029801394

Administrator

we don't have chrooted environment but you can use cloudlinux if you need something like that

aicon

Thanks, but I don't need the cloudlinux features.
I need simple to restrict the customers only to their own directory and disallow from all others.
Recently they can access the entire rootfs from php or shh.
This seems to be a very big security hole if can't be fixed from CWP.

In case anyone wants $10 bonus for FREE on cheap cloud VPS from Vultr:
http://www.vultr.com/?ref=6855695
-------------------------------------------------------------------------------------------------
And $10 bonus for FREE on cheap cloud VPS from Digitalocean:
https://www.digitalocean.com/?refcode=c41029801394

Gogo

Login as root to CWP and select FTP Management under the File Management category that should fix choot problem. Just open that and thats it, nothing else to do, it should automatically fix problem.

aicon

That doesn't change anything.
Jailkit can be a solution, is working fine in ISPConfig. Is this something that can be used in CWP?
In case anyone wants $10 bonus for FREE on cheap cloud VPS from Vultr:
http://www.vultr.com/?ref=6855695
-------------------------------------------------------------------------------------------------
And $10 bonus for FREE on cheap cloud VPS from Digitalocean:
https://www.digitalocean.com/?refcode=c41029801394

Neo2SHYAlien

Quote from: aicon on February 03, 2017, 06:29:04 AM
That doesn't change anything.
Jailkit can be a solution, is working fine in ISPConfig. Is this something that can be used in CWP?
Yes. This is shame that option is still missing in CWP
"Would you tell me, please, which way I ought to go from here?"
"That depends a good deal on where you want to get to," said the Cat.
"I don't much care where–" said Alice.
"Then it doesn't matter which way you go," said the Cat.
Neo2SHYAlien's Blog