Unlink Woes

From: Date: Fri, 20 Jul 2001 15:48:01 +0000
Subject: Unlink Woes
Groups: php.general 
Request: Send a blank email to php-general+get-58926@lists.php.net to get a copy of this message
I am working on a webpage that lets people manage certain files on the server. Everything is going pretty well, except everytime I run my Delete Code I get Warning: Unlink failed (Permission denied) in /home/www/foxjet/employees/admin.php on line 108 Here's the code if($submit == "Delete") { for ($j = 0; $j < $numfiles; $j++) { $checkname = $files[$j]; if (${$checkname} = "on") { $temp = $pwd . $files[$j]; unlink($temp); } } } /* Other Stuff */ $numfiles = count($files); for ($j=0;$j < $numfiles; $j++) echo "<Input Type=checkbox name=\"$files[$j]\"> $files[$j]<BR>"; echo "<Input Type=hidden name=numfiles value=$numfiles>"; I chmod'ed the directory to 777 and even added a line under the upload file section of the utility chmod("$fileloc",0777); When I telnet in and check the files I have ~/www/employees$ ls -la total 13 drwxrwxrwx 5 foxjet foxjetgr 1024 Jul 20 10:38 ./ drwxr-x--x 32 foxjet foxjetgr 1024 Jul 16 16:19 ../ -rw-r--r-- 1 foxjet foxjetgr 155 Jul 16 16:21 .htaccess -rw-r--r-- 1 foxjet foxjetgr 63 Jul 19 09:07 .htpasswd -rwxrwxrwx 1 nobody nobody 227 Jul 20 10:30 E-Mail Query.txt* drwxrwxr-x 2 foxjet foxjetgr 1024 Jul 20 10:13 Outlook/ drwxrwxr-x 2 foxjet foxjetgr 1024 Jul 20 10:13 Plan/ -rwxrwxrwx 1 nobody nobody 227 Jul 20 10:38 Query.txt* drwxrwxrwx 2 foxjet foxjetgr 1024 Jul 20 10:13 WeeklyReports/ -rw-rw-r-- 1 foxjet foxjetgr 3516 Jul 20 10:39 admin.php and ~/www/employees$ ls -ld drwxrwxrwx 5 foxjet foxjetgr 1024 Jul 20 10:38 ./ If anyone has any ideas I would certainly appreciate them Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com

« previous php.general (#58926) next »