• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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