|
Posted by Kimmo Laine on 03/22/06 12:35
<lorenzogordon@hotmail.com> wrote in message
news:1143022232.809686.208670@i39g2000cwa.googlegroups.com...
> Hi there,
>
> I'd greatly appreciate any insights into the following problem:
>
> I've got PHP running fine on IIS (OS: Server 2003, SP1; IIS: 6.0; PHP:
> 4.3.11).
>
> In PHP, the user uploads a file, which is then processed and the
> contents are inserted into a new file, created in PHP, onto the server.
>
> This bit works fine, the new file created by PHP is correctly stored.
>
> Later, once the user confirms the upload and PHP inserts the contents
> of the file into the DB, the code tries to remove the file created in
> PHP moments earlier, via the unlink() function.
>
> What I see on screen is the following: Permission denied
>
> I have made sure that the permissions for the Internet account that
> created (and is trying to delete) the file have full permissions over
> this particular folder and the files within it. But the user must have
> permission anyway, because they are able to create this file in the
> first place.
>
> I've looked at the permissions for the file in PHP, which read: 0666.
> So everthing *appears* ok to me; I can't see where the permission issue
> is coming from.
>
> Anyone got any ideas?
This is just a wild guess, but if you open the file with fopen, for example,
and then leave it open without fclose, and while the file is open you try to
unlink it, the file is concidered unremovable because it's in use by php.
Could something like this be the reason?
--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviφ
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
[Back to original message]
|