Welcome to WebmasterWorld Guest from 50.19.53.104

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

cannot delete files via scripting

     

markfox

11:31 pm on Sep 2, 2004 (gmt 0)

10+ Year Member



i have just setup a server with PHP and Perl on IIS and i cannot seem to delete files using PHP or Perl, i've used all the ways of unlinking the file but none of them seem to delete the file. I have read/write permission set on the files and the folder. The script i have deletes files successfully from a folder and it works on other servers but it doesnt work on mine. i am assuming i have setup something incorrectly, can anyone please advise me on what can be done.

lazydog

11:32 pm on Sep 2, 2004 (gmt 0)

10+ Year Member



Hi!

What do the error logs say?

Saurabh.

markfox

7:35 pm on Sep 4, 2004 (gmt 0)

10+ Year Member



what error logs? i dont have no error logs

Knowles

2:38 am on Sep 5, 2004 (gmt 0)

10+ Year Member



we dont need no stinkin error logs!

markfox you should be getting error logs for apahce and possibly seperate ones for php depending on how the server is setup. These are generally very useful when trying to debug errors.

markfox

5:32 pm on Sep 17, 2004 (gmt 0)

10+ Year Member



i've just checked the errors displayed, i am using IIS not apache. the error seems to be related to Permission Denied. Scripts seem to not be able to delete any files. But they can created files.

This is very strange, i have read/write permission set on that folder.

Can anyone advise me on anything?

jezra

6:34 pm on Sep 17, 2004 (gmt 0)

10+ Year Member



If you have physical access to the server, you might want to try the following.
1. create a folder on the server with write access available to everyone
2. write a php script to create a file in the new folder
3. run the script
4. check the owner and or creator of the file.
5. make sure that user has read/write access to the folder you are having a problem with.

jezra
quick question: what version of IIS are you running?

lazydog

2:44 pm on Sep 18, 2004 (gmt 0)

10+ Year Member



Hi!

1. Creating a new file depends on the folder permissions, but
2. Deleting a file depends on the "folder permissions" as well as the "file permission"

You prob. need to check the permissions on the file that you want to delete.

If you have time, pls. read an article/tutorial on file permissions. It will prove most helpful in the long run.

Saurabh.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month