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? 4 14543
"lawrence" a écrit le 17/11/2003 : 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?
Change the rights with chmod(777) before deleting.
Jedi121 wrote: 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.
Also, output the name of the file you're trying to delete, so that
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, lk******@geocities.com (lawrence) wrote in message news:<da**************************@posting.google. com>... 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?
If the file name you uploaded already existed on the web server and
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 lk******@geocities.com (lawrence) wrote in message news:<da**************************@posting.google. com>... 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?
Well, okay, what I get from this debate is that the first place I
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: JaazzMan |
last post by:
Hi! I wrote this script and executed on my server, with php 4.1.2
<?php
$fp = fopen('test.txt', 'w');
fwrite($fp, "Bla bla");
fclose($fp);
?>
it returns this message:
|
by: Bob Bedford |
last post by:
I've tried everything seen on Internet, but nothing works:
I'm trying to move a file from a dir to a subdir (WinXP Pro, Apache, PHP
4.3.3)
Here is the code:
chmod($XMLPath, 0777);...
|
by: Stéphane Ninin |
last post by:
Hello world,
I am fighting with what is probably a stupid problem.
In a wxpython GUI, here is a method which must read a file,
and if the file is not correctly formed rename it and create a...
|
by: Benjamin |
last post by:
Hello, I'm running PHP 5.2.0 as a Apache 2.2 server module. When, I try
to unlink I get this: "Warning: unlink(file.txt) :
Permission denied..." What and how do I change this so it works?
Thanks
|
by: f rom |
last post by:
----- Forwarded Message ----
From: Josiah Carlson <jcarlson@uci.edu>
To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org
Sent: Monday, December 4, 2006 10:03:28 PM
Subject: Re: ...
|
by: nitinpatel1117 |
last post by:
Hi
I am trying to delete a csv file using the unlink() function, but i keep getting a permission denied warning
Warning: unlink(UsedNOS200704191.CSV): Permission denied in...
|
by: srini4vasan |
last post by:
Hi,
I wrote a small socket program in C++ using unix machine.
Compiler CC.
It is asking some library file or linker file
Could you please send the library files or linker files for following...
|
by: webandwe |
last post by:
Hi, the following coding is and the whole of the admin, it uploads images you select to the folder called images:
But the problem is is sets the images permissions to 600 and I need them to be 644...
|
by: Morteneistrom |
last post by:
Im a complete n00b at PHP so please forgive me if this i a stupid
question
Why wont the following work.
PHP Code:
<?php
foreach (glob('../images/profil/*.jpg') as $filename) {
echo...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| | |