Welcome to WebmasterWorld Guest from 54.196.244.186

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

cannot delete files via scripting

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

New User

10+ Year Member

joined:Aug 5, 2004
posts:8
votes: 0


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.
11:32 pm on Sept 2, 2004 (gmt 0)

New User

10+ Year Member

joined:Aug 22, 2004
posts:40
votes: 0


Hi!

What do the error logs say?

Saurabh.

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

New User

10+ Year Member

joined:Aug 5, 2004
posts:8
votes: 0


what error logs? i dont have no error logs
2:38 am on Sept 5, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


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.

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

New User

10+ Year Member

joined:Aug 5, 2004
posts:8
votes: 0


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?

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

Full Member

10+ Year Member

joined:Feb 4, 2004
posts:215
votes: 0


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?

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

New User

10+ Year Member

joined:Aug 22, 2004
posts:40
votes: 0


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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members