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
https://forums.phpfreaks.com/topic/58579-can-php-script-read-from-mounted-drives/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.