<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
01272006 1107 GMT-6<br>
<br>
Ok. I changed the permission to www-data as user and group for the file
Im working with. I then ran the script. I can write to the file but I
cannot read from it. There are no errors that show though. <br>
<br>
Wade<br>
<br>
Stephen R Laniel wrote:
<blockquote cite="mid20060127165634.GR9652@TheloniousMonk.laniels.org"
 type="cite">
  <pre wrap="">On Fri, Jan 27, 2006 at 10:23:44AM -0600, Wade Smart wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Im doing a tutorial on writing and reading files created through php and im
having a bit of a problem. I understand that that file needs to already be
created so you can set permissions on it but, my book says that php has no user
or group that it belongs to and so you set the file owner and group it belongs
to, to apache. I do not see that in the lists. Do I have to add this? Surely
not. Apache is running fine at the moment so it must be under something not
instantly recognizable.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I'm not sure that I understand your question. If the PHP
script is running within Apache, it will run as the Apache
user. Normally the apache user is 'www-data' or somesuch,
though it's configured in /etc/apache/httpd.conf -- e.g.,

User www-data
Group www-data

When you run a PHP script under Apache, Apache invokes a
subprocess to run as that user and that group, and that
subprocess runs the PHP script.

Another alternative is for the scripts to run suid, which
means that they run as the user who owns them.

  </pre>
</blockquote>
</body>
</html>