php - Snow Leopard mounted directory changes permissions sporadically -


I have an SMB mounted directory: / Volume / MyShear

It's mounted through Finder "Connect to connect server ..." smb: // myservername / myshare

Everything is fine so far.

However, when I try to access the directory through PHP (Apache is running in), then fails with permission, about 10% of the time is declined. This means that sometimes my failure to access my page is a failure, my php page looks like this:

  & lt ;? Php $ cmd = "ls -la / section / 2> and 1"; Exec ($ cmd, $ execOut, $ exitcode); Echo "& lt; PRE & gt; Exit code = $ exitCode & lt; BR / & gt;"; Forex currency ($ execution as $ line) {resonant "$ line"; BR / & gt; ";} Echo" & lt; / PRE>; ";? & Gt;  

When it is successful, it looks like:

  Remove code = 0 total 40 drwxrwxrwt @ 4 Root Administrator 136 June 14 12:34. Drwxrwxr-t 30 Root Administrator 1088 Jun 4 13:09 .. drwx ------ 1 Galen Staff 16384 14 Jun 09:28 myshare lrwxr-xr-x 1 Root Administrator June 1 11 16:05 galenhd -> /  

When this fails, it looks like this:

  Remove code = 1 ls: myshare: with permission Total 8 drwxrwxrwt @ 4 pass through root administrator 136 June 14 12:34 Drwxrwxr-t 30 Route Administrator 1088 Jun 4 13:09 .. lrwxr-xr-x 1 Root Administrator 1 Jun 11 16:58 galenhd -> /  

Other information:

I am working with PHP (5.3.1), and Apache server with Snow Leopard It comes out of the box.

In addition to this, if I write a PHP script which does not seem to be unsuccessful with the "Ls -la .." command line.

The code and / Or anything about the file system varies and fails, so it actually appears to be intermittent failure.

This is driving me crazy. Anyone can find out What is happening?

Thank you, Galen

I'm guessing that this is probably related to the SMB server Not because I can not reproduce after running the command line manually, in other words it is just failing to run through the web (i.e. while hitting the page of an apache).

So it looks like it is for me as if it is a "Apache" PHP or "Apk" bug ...

Now I see that the page "Permission denied" status Is stuck in In other words it fails for the first time fails to reproduce me, and several steps have also been taken to exit the "Permission denied" status:

1) Bar Press the PHP page until it fails (it will "fail" after it fails)

2) Once this fails, a ls / Volume will be executed.

3) Works a sudo ls / volume (i.e. can see the root directory). Normal user still fails as trying ls ...

4) However ( this is an interesting part ) a Sudo ls-l / volume actually on the repair mount. In other words, after this command both PHP and command line start working again as a normal user.

Conclusion?

It looks like this breaks the Mount / PHP / Apache mount (mounted above code), changes the permissions, which lock the user then the root one < Code> sudo ls -l / volume !!!

You can restore permission by issuing

What is happening here is a very basic code. Certainly someone has seen this before ...



Maybe it's related?


Update: 2010-06-15: My machine was updated to 10.6.4, which claimed help with SMB mount issues. However, this problem was not corrected as I see more and more like the problem of the epa ...


Update: 2010-06-16 : If the code has been changed:
$ CMD = "LS-A / version / 2> and 1";
(deleted-el option) does not fail in other words "-L" flag is causing failure ...


UPDATE2: 2010-06-16 : Since it looks like Apache (on Mac?) Problem, I've posted on the Apache forum:


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -