Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

could the perl script work outside of a virtual directory? I mean Perl script which will be capable to search, retrieve and copy files from a host system directory and send it by mail. Script which run on a virtual host, but it need do work outside of its virtual directory.

Replies are listed 'Best First'.
Re: work outside of a virtual directory
by edan (Curate) on Nov 11, 2004 at 15:24 UTC

    A Virtual Script can only work inside its Virtual Directory, but a real perl script works anywhere!

    But seriously, if you're talking about a CGI which you're calling from a virtual host configuration section, and you want to know whether the script can access the rest of the filesystem... (I'm guessing here), then the answer is:

    Yes. With the normal restrictions of permissions, meaning the script can only go places that the user that is running the script can go, which means whatever user the webserver is running as.

    --
    edan

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: work outside of a virtual directory
by TedPride (Priest) on Nov 12, 2004 at 08:24 UTC
    I think what you're asking is, can a script run from inside a virtual directory and access material from outside the virtual directory? The answer is yes - but only if that material has the proper permissions settings. You can't modify system files, for instance.
      Yes, I mean this. I need well thought script which will copy and deliver me by email some files that located outside this virtual directory. I will set file type or file name via script GUI. I'll wondering if someone can help me.