Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've a debian linux server with apache2.2 & php5 installed.
I've created many virtual hosts on my apache server, each virtual host has a separate root directory & php is enabled for all of them. Now I need to limit php scripts in each virtual host in some manner that they can only read, write or modify only in v-host root directory & it's sub-directories (& not parent directories), in other hand, I want create a jail for scripts which are running on every virtual host.
For example, php scripts that located in /var/www/vhost1 can only access to files in same directory & sub-dirs & they don't have access to /var/www/host2 files (not for read nor modifying them).
any idea?

share|improve this question

1 Answer 1

You would need to create a jail for each and every host and run PHP via CGI/FASTCGI with chroot set to the right directory.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.