Ask a Question related to PHP Development, Design and Development.
-
lawrence #1
permission error on unlink, but who has permission if not PHP?
I wrote some code that let me upload a file to my server. Then I wrote
some code to let me delete the file. But when I try to delete, I get
this error:
Warning: Unlink failed (Permission denied) in
/usr/local/www/vhosts/publicdomainsoftware.org/htdocs/ppUtilityCode/mcAdminImages.php
on line 254
I don't get it. If PHP uploads the file, how can PHP not have the
permission to delete it?
lawrence Guest
-
550 Access is denied - permission error
hi all. im having an issue tring to connect to a site using contribute 3.11. i get this error. Make Directory Test: The server is unable to... -
permission error from opened PDF document
I have a program written in asp which would view a scanned pdf document and delete it after coping to other folder. It use to work fine until I... -
fastcgi permission error
Hello, I'm trying to set up ruby-fastcgi on redhat 9. Everything seems to be set up right, but I get an error in my apache logs when I try to... -
flock() Permission denied error
Hello, when using flock() I get a permission denied error: Warning: fopen("<filename>", "r+") - Permission denied in <pathtofile> on line 7 I... -
Permission denied error
Hello I have the following configuration: - Windows 2000 Adv Server - IIS is running on this machine - I have some ASP scripts and a global.asa... -
Jedi121 #2
Re: permission error on unlink, but who has permission if not PHP?
"lawrence" a écrit le 17/11/2003 :
Change the rights with chmod(777) before deleting.> I wrote some code that let me upload a file to my server. Then I wrote
> some code to let me delete the file. But when I try to delete, I get
> this error:
>
> Warning: Unlink failed (Permission denied) in
> /usr/local/www/vhosts/publicdomainsoftware.org/htdocs/ppUtilityCode/mcAdminImages.php
> on line 254
>
>
> I don't get it. If PHP uploads the file, how can PHP not have the
> permission to delete it?
Jedi121 Guest
-
Matty #3
Re: permission error on unlink, but who has permission if not PHP?
Jedi121 wrote:
Also, output the name of the file you're trying to delete, so that>>> I don't get it. If PHP uploads the file, how can PHP not have the
>> permission to delete it?
> Change the rights with chmod(777) before deleting.
you can make sure it's really what you think it is...
It may be that you're trying to delete a directory that the webserver
process doesn't own, etc,
Matty Guest
-
Kevin Collins #4
Re: permission error on unlink, but who has permission if not PHP?
[email]lkrubner@geocities.com[/email] (lawrence) wrote in message news:<da7e68e8.0311171149.7aa010cb@posting.google. com>...
If the file name you uploaded already existed on the web server and> I wrote some code that let me upload a file to my server. Then I wrote
> some code to let me delete the file. But when I try to delete, I get
> this error:
>
> Warning: Unlink failed (Permission denied) in
> /usr/local/www/vhosts/publicdomainsoftware.org/htdocs/ppUtilityCode/mcAdminImages.php
> on line 254
>
>
> I don't get it. If PHP uploads the file, how can PHP not have the
> permission to delete it?
the web server user (apache?) has write permissions to the file, it
will be allowed.
To unlink, the web server user must have write permissions to the
directory.
Conversely, if a user has write permissions to a directory, it may
delete files from that directory regardless of who owns them...
Hope this helps,
Kevin
Kevin Collins Guest
-
lawrence #5
Re: permission error on unlink, but who has permission if not PHP?
[email]lkrubner@geocities.com[/email] (lawrence) wrote in message news:<da7e68e8.0311171149.7aa010cb@posting.google. com>...
Well, okay, what I get from this debate is that the first place I> I wrote some code that let me upload a file to my server. Then I wrote
> some code to let me delete the file. But when I try to delete, I get
> this error:
>
> Warning: Unlink failed (Permission denied) in
> /usr/local/www/vhosts/publicdomainsoftware.org/htdocs/ppUtilityCode/mcAdminImages.php
> on line 254
>
>
> I don't get it. If PHP uploads the file, how can PHP not have the
> permission to delete it?
should look for trouble is to make sure the code is trying to delete
the same file I think I specified. I appreciate feedback that tells
where to look for me trouble, so thanks.
lawrence Guest



Reply With Quote

