T
torkild
Guest
Hello! I have tried for some time now to create a folder outside the domain spesific "httpdocs"-folder and leting some domains access it trough php.
The files they are going to access are library-files, who can do no harm at all to the server, and the user is only going to have read-access to this folder.
Lets say the folder is located in the root of the server, f.ex: "/php-libs", and in this folder there are som php-files, among them f.ex: "form-class.php".
So the php-file in the domains httpdocs should be able to
and then create a new instance of the form class.
The domains that is allowed to do this has the following in the vhost.conf file:
The big question I guess is: What permissions should I give the "php-libs" folder? What user and what group should I set up?
The files they are going to access are library-files, who can do no harm at all to the server, and the user is only going to have read-access to this folder.
Lets say the folder is located in the root of the server, f.ex: "/php-libs", and in this folder there are som php-files, among them f.ex: "form-class.php".
So the php-file in the domains httpdocs should be able to
PHP:
include('/php-libs/form-class.php');
The domains that is allowed to do this has the following in the vhost.conf file:
<Directory /var/www/vhosts/@domain_name@/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/@domain_name@/httpdocs:/tmp:/php-libs"
</Directory>
The big question I guess is: What permissions should I give the "php-libs" folder? What user and what group should I set up?