Re: Problem with PHP and mounted folder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



r


On Fri, Feb 28, 2014 at 1:00 PM, Cliff Nieuwenhuis <
c.nieuwenhuis@xxxxxxxxxxxxxx> wrote:

>
> Cliff Nieuwenhuis wrote:
> [snip]
>
> > The web application needs to read and create files in the projects
> folder, but
> > PHP doesn't recognize the projects folder as folder!  I suspect a
> > permissions problem of some sort, but I can't figure out where.
>
> [snip]
>
> Aziz Saleh wrote:
>
> > You guessed right. PHP usually runs under a user with less permissions
> (www, user, etc..). You are probably
> > logged in as a user with permissions to access that mounted drive while
> PHP isn't. Both fixes are ugly, but
> > what I would recommend is giving permission to those files as opposed to
> giving PHP user more power.
>
>
> Thanks for the reply.
>
> I thought that PHP runs under HTTPD as user 'apache'.  I know that the
> Apache webserver runs as user 'apache' on my system -- does PHP run as a
> different user?  Assuming that it does not, wouldn't my successful test of
> traversing, reading, and writing files under the 'projects' folder by doing
> 'su - apache -s/bin/bash' mean that the permissions are OK?  I guess not,
> but I can't see why not.
>
> --
> Cliff Nieuwenhuis
>
>
You are correct, when I said PHP I meant through the server. Try using
runuser command instead. If you have exec enabled, try running an ls
command as a user with higher permissions and see if that works.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux