• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

How do I give multiple domains read access to a folder outside their own httpdocs?

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
PHP:
include('/php-libs/form-class.php');
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:
<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?
 
i dunno

I don't know the specific answer to your question but I was trying to solve a similar problem (executing PEAR library includes outside of the web root folder) and basically cobbled together a solution based on the error messages I was receiving from my script--I ended up turning off php's safe mode and also adding the path to the directory you want to use to php's open_basedir environment variable. I don't recall setting the linux file permissions to anything in particular to make it work.
 
Back
Top