• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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