1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Is Plesk changing the linux permissions?

Discussion in 'Plesk for Linux - 8.x and Older' started by rfuguet, Jul 9, 2008.

  1. rfuguet

    rfuguet Guest


    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:

    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:

    echo "Starting";

    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?

  2. breun

    breun Golden Pleskian

    Jun 28, 2005
    Likes Received:
    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:

    <Directory /var/www/vhosts/domain1/httpdocs>
    php_admin_value open_basedir "/var/www/vhosts/domain1/httpdocs:/tmp:/var/www/vhosts/domain2/httpdocs/path2"
    See Including Directives into Web Server Configuration File for instructions on adding custom Apache settings for a domain.
  3. rfuguet

    rfuguet Guest


    Yes! It was open_basedir.

    Thanks breun!