• Hello,

    thank you for the great plugin.

    We are using the File Manager Advanced plugin together with Shortcodes
    to provide files to front end users.

    This is the shortcode, for Example:

    [file_manager_advanced login="yes" roles="um_ua_kunde_name" path="/data/sftp/downloads/WP/transfer_name" path_type="outside" operations="download"]

    The “transfer_name” directory contains symbolic links:

    www-data@webhost:/data/sftp/downloads/WP/transfer_name$ tree
    .
    ├── _Download Kunde -> ../../name
    ├── SOFTWARE_Allgemein -> ../../Allgemein_ORK
    ├── SOFTWARE_ALLGEMEIN2 -> /data/sftp/downloads/Allgemein_ORK
    ├── SOFTWARE_PKV -> ../../typ_pkv
    ├── SOFTWARE_PKV2 -> /data/sftp/downloads/typ_pkv
    └── VESPUCCI PZN Connect Allgemein -> ../../Allgemein_VPC
    
    6 directories, 0 files
    www-data@webhost:/data/sftp/downloads/WP/transfer_name$

    Those “relative path” symbolic links stopped working.

    In the case of a link target like “../../Allgemein_ORK“, the symlink is shown in the File Manager as a “Broken alias“.

    However, the symlink is valid, and the OS user running wordpress, “www-data”, is able to use it to get to the target directory.
    The OS user can also access the files in the directory, for examle this PDF:

    www-data@webhost:/data/sftp/downloads/WP/transfer_name$ ls -la SOFTWARE_Allgemein
    lrwxrwxrwx 1 innoftp innoftp 19 Mar  3  2021 SOFTWARE_Allgemein -> ../../Allgemein_ORK
    www-data@webhost:/data/sftp/downloads/WP/transfer_name$ cd SOFTWARE_Allgemein
    www-data@webhost:/data/sftp/downloads/WP/transfer_name/SOFTWARE_Allgemein$ pwd
    /data/sftp/downloads/WP/transfer_name/SOFTWARE_Allgemein
    www-data@webhost:/data/sftp/downloads/WP/transfer_name/SOFTWARE_Allgemein$ ls -latr
    total 4308
    -rw-rwx---+   1 innoftp innoftp 4391207 Jun  8 14:37 'SOFTWARE  2021.2 1_Betriebshandbuch.pdf'
    drwxrwx---+   2 innoftp innoftp    4096 Jun  8 14:39  .
    drwxrwx---+ 153 innoftp innoftp    4096 Oct 25 12:29  ..
    www-data@webhost:/data/sftp/downloads/WP/transfer_name/SOFTWARE_Allgemein$ head -n1 'SOFTWARE  2021.2 1_Betriebshandbuch.pdf'
    %PDF-1.5
    www-data@webhost:/data/sftp/downloads/WP/transfer_name/SOFTWARE_Allgemein$

    This used to work in File Manager as well.

    A symlink with an absolute path as a target, like “/data/sftp/downloads/Allgemein_ORK“,
    works in the file manager to get me to the destination.

    It correctly displays the directory contents.

    Unfortunately, when I attempt to open the PDF file, I get to a “File Not Found” page.

    When I attempt to Download the file, it works and the file gets downloaded correctly.

    Very curious.

    So I have two issues:

    Why do relative links no longer work?
    Can you fix this?

    And why does only “download” work, but “open” does not?
    Am I using the shortcodes incorrectly?

    Thank you very much in Advance.

    Best regards,

    Christoph

  • The topic ‘Relative symlinks are not working.’ is closed to new replies.