• I have some Sites running on a Plesk-managed Debian 8 server. Plesk gathers the statistics like this:

    • DocRoot: /var/www/vhosts/{domain}/httpdocs
    • Stats: /var/www/vhosts/system/{domain}/statistics

    i.e. the statistics are – correctly – outside the DocRoot. To enable simple access to them, I have added a symlink under ‘httpdocs’ to the ‘/var/www/vhosts/system/{domain}/statistics’ directory.

    I do not want to have the statistics, which are regularly updated, checked for file changes.

    BUT the SYMLINK is NOT SHOWN in iThemes Security ‘Files and Folders List’ on the left side. And when I add it manually to the right side, it is not respected, I’m getting errors like this in my PHP log:

    [03-Dec-2016 07:34:31] WARNING: [pool annareeves.eu] child 14902 said into stderr: “NOTICE: PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File(domstat) is not within the allowed path(s): (/var/www/vhosts/{domain}/:/tmp/) in /var/www/vhosts/{domain}/httpdocs/wp-content/plugins/better-wp-security/core/modules/file-change/scanner.php on line 442”

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try and create a test script like this:

    <?php
    echo 'Directory ?: '. is_dir( '/var/www/vhosts/system/{domain}/statistics' );
    ?>

    … where {domain} should be substituted with the actual domain name.
    Save the script in the /var/www/vhosts/{domain}/httpdocs folder.

    Then run the script from your browser and if you get the warning:

    PHP Warning: is_dir(): open_basedir restriction in effect.

    You simply don’t have access to that folder. So if you can somehow resolve that
    I think you should be ok.

    Thread Starter Tim Reeves

    (@tim-reeves)

    Thanks @pronl,

    I know I can get rid of the error messages by extending open_basedir. The point is, that iThemes Security does not offer (left) or respect (right) when I (want to) exclude the symlink from file change testing.

    Cheers, Tim

    • This reply was modified 8 years, 3 months ago by Tim Reeves.
    Thread Starter Tim Reeves

    (@tim-reeves)

    This seems to have been added already – the version 5.9.0 shows the symlinks (since I have linked directories, it shows me directories). Thanks!

    @tim-reeves

    Great, thanks for the feedback.
    What version of the plugin didn’t show the symlinks ?

    Thread Starter Tim Reeves

    (@tim-reeves)

    Must have been 5.8.0

    Thread Starter Tim Reeves

    (@tim-reeves)

    Sorry to have to reopen this, but it still is happening at most of my sites. Only on one site I saw the destination directories of the symlinks in the left-hand box, so I assumed it was fixed. But it is not – maybe that was some sopeciality of the underlying file system.

    @tim-reeves

    Try and perform a simple test on the failing envs by simply navigating through folders from the browser (make sure the Apache “Options Indexes” is enabled). Are symlinks displayed then and can you navigate to them ?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘File Change Detection fails on symlinks’ is closed to new replies.