NYCPHP Meetup

[nycphp-talk] Session problem with MAC/Unic/Apache

Greg Rundlett greg.rundlett at gmail.com
Sat Feb 18 19:46:30 EST 2006


On 2/18/06, Kenneth Dombrowski <kenneth at ylayali.net> wrote:
> On 06-02-18 14:28 -0500, Cliff Hirsch wrote:
> > My error log has the appropriate permissions. I assume nobody is the
> > PHP process.
> >
> > But what's with the session files? -rw------ isn't very useful is it?
> > I assume www is the Apache process. How do I make it create readable
> > session files?
> >
> > cliff-hirschs-mac-mini:/var/tmp root# ls -al
> > -rw-r--r--    1 nobody    wheel  2877 Feb 18 12:14 kerbeez_errors.log
> > drwxrwxrwt    4 root      wheel   136 Feb 16 08:34 mds
> > -rw-------    1 www       wheel    30 Feb 18 10:57 sess_4BAFfxHA........
> > -rw-------    1 www       wheel    30 Feb 17 16:07
> > sess_7A93rjA..........
> >
>
>
> 0600 (-rw-------) is perfectly appropriate for session files; apache can
> read them & write to them, and nobody else can.
>
> I would look into why your error log is owned by nobody & your session
> files are owned by www, do you have two apaches running on that machine?
>

or, if you manually chown'd the files, you mistakenly assumed that PHP
and Apache run as separate users.  PHP is just an extension of Apache,
so whatever is configured in Apache's conf for 'user' then  that is
what PHP's scripts need permission for.



More information about the talk mailing list