Jump to content

Can PHP script read from mounted drives?


kaubster

Recommended Posts

I have a PHP script which is triggered via an .htaccess file utilizing AddHandler and Action commands. The script has worked perfectly up till recently when I moved most of our web content to a separate RAID server.

 

PHP includes work for pulling in any page located under my web folder (htdocs). However, if I try to pull in a file from a mounted drive (folder sitting outside the web folder, mapped to a completely different hard disk), nothing happens.

 

This mapped folder (‘ /content ‘) is a mounted alias that points to the raid server drive. The permissions on the ‘/content’ folder itself, the folder contents and the test script all match those of the web servers Apache process.

 

To isolate the problem, I wrote a script to read the contents of the mounted drive directory. If I run the script from a shell, it will read the mounded drive directory. However, if I run that same script using a browser from the web folder, it will not read the directory.

 

Would anyone recommend a different approach?

 

Are there built in web server or PHP restrictions that will not allow me to read from a folder so close to /root?

 

This sounds like permission problem, though I cant understand what has been configured incorrectly.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.