Skip to content

Serve files from outside the directory (safely?) #736

Answered by PHLAK
yourfate asked this question in Help & Support
Discussion options

You must be logged in to vote

I wouldn't recommend removing/disabling the open_basedir directive. This prevents access to files outside of you Directory Installation (e.g. system files). As you stated, symlinks don't work however I do believe hard links should since they appear as an actual file at the location specified.

I'm unfamiliar with nullfs mounts so can't attest to how good or bad an idea they would be but am glad it worked for you.

One other thought that occurred to me would be to add the directory paths you want to symlink to the open_basedir directive manually. For example

// Set file access restrictions
ini_set('open_basedir', __DIR__:/some/other/directory:/yet/another/folder);

This may even be a configur…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yourfate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants