• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Is Plesk changing the linux permissions?

R

rfuguet

Guest
Hi!

I'm migrating a website made in PHP to Plesk, and I have some troubles with permissions. Is it possible that Plesk overide the permissions that I put in console? I turned out the safe_mode, but i'm not sure if this is enough.

The file test_server.php:

<?php
echo "Test message";
?>

is in /var/www/vhosts/domain1/httpdocs/path1/test_server.php
and its permissions are: 775 user1 group1

The file test_include.php:

<?php
echo "Starting";
require_once("/var/www/vhosts/domain1/httpdocs/path1/test_server.php");
?>

is in /var/www/vhosts/domain2/httpdocs/path2/test_include.php
and its permissions are: 775 user1 group1

When I execute test_include.php in a browser, I can see "Starting", but not "test message".

When I move test_server.php to the same domain of test_include.php (/var/www/vhosts/domain2/httpdocs/path1/test_server.php) it works.

When I enter by terminal, (user1@domain2) I can access the file without problems when I type:
vi "/var/www/vhosts/domain1/httpdocs/path1/test_server.php"
(user1 is not root)

Finally, some folders in httpdocs have the 755 permissions, but when I type in a browser return "403 Forbidden".

I have read Plesk documentation, and searched centos permissions, but now I'm stuck.

Some clue?

Thanks!
 
Plesk uses PHP's open_basedir setting to restrict PHP scripts to their domain's httpdocs directory (and /tmp) for security. If you check the domain's error_log you'll see that the open_basedir restriction is in effect (or enable display_errors to see errors in your browser, but this is not recommended for production sites).

You can override a domain's open_basedir setting if you want, for instance you can add domain2's path2 directory to domain1's open_basedir like this:

Code:
<Directory /var/www/vhosts/domain1/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/domain1/httpdocs:/tmp:/var/www/vhosts/domain2/httpdocs/path2"
</Directory>

See Including Directives into Web Server Configuration File for instructions on adding custom Apache settings for a domain.
 
Back
Top