• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Access files in other domain with php

cibou

New Pleskian
Hello, I removed the php directive to enable the visibility of all folder in the server with php.
But when I try to access another domain like /var/www/vhosts/AnotherDomain/httpdocs/XX, it says that the folder does not exists.. and ofc it exists :)

there is a configuration I missed in plesk?

thank you.
 
This is not yet what is needed. Please provide the script excerpt. It is important to pay attention to details. Is the path starting with a /, is it formed correctly, e.g. /var/www/vhosts/yourdomain.tld and not /var/www/vhost/yourdomain.tld or 7var/www/vhosts/yourdomaintld etc. Is the spelling of the directories perfectly correct, e.g. the capitalization etc.

It would also be good to know which operating system you are using and which PHP version, because for example in CloudLinux with their secure PHP versions, the user accounts are jailed to their roots and won't be able to access other areas of the server.

Maybe opening a support ticket will be the better option here, too, because support staff will check it directly on your server and come up with the solution for sure.
 
hello :
I am using this method in symfony (php) on ubuntu server:

$finder->files()->in($path);
where my path is : "/var/www/vhosts/myevercard.com/httpdocs/card/"

So to double check if I could see this folder I tried that :

echo is_dir('/var/www/vhosts/myevercard.com/httpdocs/card/') . "\n";

but it is still false :-(

is it clear? :)

thank you
 
Hi, I eliminated the php mandate to empower the perceivability of all envelope in the server with php.
However, when I attempt to get to another area like/var/www/vhosts/AnotherDomain/httpdocs/XX, it says that the envelope doesn't exists.. what's more, ofc it exists :)

there is a design I missed in plesk?

much thanks to you.
 
Hi, I eliminated the php mandate to empower the perceivability of all envelope in the server with php.
However, when I attempt to get to another area like/var/www/vhosts/AnotherDomain/httpdocs/XX, it says that the envelope doesn't exists.. what's more, ofc it exists
I am having difficulties to understand what is meant. I am not sure that "eliminated PHP mandate" means and what "empower the perceivability of all envelope" means. Could you please rephrase this?
 
The configured file/directory permissions and ownership prevent access to any path of other subscriptions with PHP.

This is by design and "hardcoded" - so it's nothing you can change in the panel to make it work otherwise.
You can manually change permissions on the filesystem, but don't be surprised when a "plesk repair" or even some automatic Plesk operation will revert this back one day.
 
I will now forget that I have ever read such a question.... :eek:

Easiest way to achieve what you want, should be this:

Code:
chmod o+rX /var/www/vhosts/AnotherDomain
chmod o+rX /var/www/vhosts/AnotherDomain/httpdocs

After that, every website on your server has the permission to traverse into the website directory of this AnotherDomain and read the files there.
Of course you will also need to disable/adjust the PHP open_basedir setting on the website from where you try to access these files of AnotherDomain, but according to your first post, you already did that.

Just keep in mind that this is an "insecure" setting and the Plesk panel may choose to revert that at any time. (and I know for sure that a manual execution of the "plesk repair fs" commandlet will do so)
 
Back
Top