[Techtalk] php and apache and permissions

k.clair kclair at serve.com
Fri Dec 20 11:59:16 EST 2002


Hey all,

Another question for you (befuddling week here at work).

We have a user who is using php scripts to upload files to their
directory.  The directory that they are writing the files to has the
following permissions:

drwxr-xr-x    2 User users  (where User is their username)

However, all the files that are in the directory that have been uploaded
are owned by user "www" and group "users".  This makes sense to me
because php is run as www. What does not make sense to me is: how can
php write to that directory if it's only writeable by the user?

I don't know much about php, but it looks like the command they're using
to write to the directory is:

copy($workphotofile, $copyname);

$workphotofile seems to be set directly by this html form tag:
<input type="file" name="workphotofile">

(I can't see what the original path and filename of $workphotofile is... 
is this some temporary location used internally by php?)

thanks again,
kristina

### my gpg key can be found here:
http://www.klerp.net/gpgkey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
Url : http://linuxchix.org/pipermail/techtalk/attachments/20021220/a1c59d7f/attachment.pgp


More information about the Techtalk mailing list