Jump to content

[SOLVED] PHP and NFS


fats

Recommended Posts

Hey People,

 

I'm trying to set up my Apache server in such a way that it uses an NFS mount as the document root.

However, I get the following error:

 

[Wed May 13 21:42:30 2009] [error] [client 127.0.0.1] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0

[Wed May 13 21:42:30 2009] [error] [client 127.0.0.1] PHP Fatal error:  Unknown: Failed opening required '/shrdev/ac/staging/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0

 

I've tried the following on the web server:

chmod -R 777 /shrdev

chown -R apache /shrdev

 

Both do not make any difference.

 

Copying the entire source tree to a local directory and making that the document root works just fine, even no need for chmod.

 

I'm using Fedora Core 10.

Link to comment
https://forums.phpfreaks.com/topic/158013-solved-php-and-nfs/
Share on other sites

Thanks for your reply.

 

Although I think it's a good suggestion, I just tried a chown -R nobody on the tree (mind that nobody has the same uid on both machines), but it doesn't help.

 

Also tried to add anonuid=500 (I reset the tree back to its original owner with uid 500) to the exports file and restarted nfs, did not help either. To be specific: /shrdev iptohemachinehere(rw,anonuid=500,insecure)

Link to comment
https://forums.phpfreaks.com/topic/158013-solved-php-and-nfs/#findComment-833608
Share on other sites

  • 2 weeks later...

Try adding this to /etc/exports

 

/mnt/exporting_this *(sync,no_root_squash,rw)

 

Then run 'exportfs -av', followed by 'exportfs' to confirm it shows up.  Then try it, let us know.

That seems to have done the trick. Thanks! :-)

 

Not sure why though, was it the sync option? If so, I fail to understand how it could have solved the problem other than that the error is bogus and in reality it just couldn't find the file?

Link to comment
https://forums.phpfreaks.com/topic/158013-solved-php-and-nfs/#findComment-848170
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.