You are here: Fwd: [PHP] `ls -l /` does not reproduce same info than when executed in bash. « PHP « IT news, forums, messages
Fwd: [PHP] `ls -l /` does not reproduce same info than when executed in bash.

Posted by Rory Browne on 09/28/13 11:10

Forwarding to list - forgot to cc.
---------- Forwarded message ----------
From: Rory Browne <rory.browne@gmail.com>
Date: Thu, 10 Mar 2005 18:50:41 +0000
Subject: Re: [PHP] `ls -l /` does not reproduce same info than when
executed in bash.
To: Hans Deragon <hans@deragon.biz>


Perhaps Jay has a point, but I don't think so. To confirm this, you
can probably check some variable in phpinfo, or you can run 'whoami'.

How are you running ls -ld? system? exec? Try backticks or shell_exec().


On Thu, 10 Mar 2005 11:41:31 -0500, Hans Deragon <hans@deragon.biz> wrote:
> Jay Blanchard wrote:
> > [snip]
> > I did "su - apache" to switch to the same user under which the Apache
> > server is running and tried the "ls -ld /" under bash, and it worked
> > fine. Thus the server's has all the permissions to read the root
> > directory. Yet PHP does not seam to have these permissions.
> > [/snip]
> >
> > Good work Sparky, you answered your own question.
> >
> > Who does PHP run as? Does it really run as Apache?
>
> Since PHP runs under Apache, I assume it runs under the apache user. But if I
> am wrong, please advise.
>
> For the other readers, sorry for submitting twice my email to the list. I had
> a problem with my mailer...
>
>
> Best regards.
> Hans Deragon
> --
> Consultant en informatique/Software Consultant
> Deragon Informatique inc. Open source:
> http://www.deragon.biz http://facil.qc.ca (Promotion du libre)
> mailto://hans@deragon.biz http://autopoweroff.deragon.biz (Logiciel)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация