Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permissions Issue

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
Guys,

I am getting a permission denied error when I try to delete a file from a directory. My program creates a file, writes to it, closes it, emails it and then attempts to delete it. It all works apart from the delete action. How come I have permission to create a file but not to delete the same file??? Mighty :)
 
What version of IIS are you using?

You will probably find that you are setup with read and write permissions but not delete permissions. Delete is a seperate permissioning issue.
 
I have tried it on two different machines - one with IIS5 and one with IIS4. Where do I check out the permissions? Is it an IIS thing or a WinNT/Win2k permissions issue? Mighty :)
 
Try this on Win 2000/IIS5:
In windows Explorer -
browse to your website directory.
Right-click and then choose properties. Select the security tab.
Highlight anonymous user - you will see the permissions listed below.
If there is a tick in "allow inheritable permissions..." at the bottom then uncheck it else the main websites permissions will overwrite al your permissioning. It will probably bring up a box asking you what to do with the permissions - select copy to copy the default website permissions.
Now go to advanced. You will need to view/edit the permissions for allow anonymous user. You will see a list of options - you will need to tick the delete box. Also tick the very bottom box "apply these permissions...within this container..." - to make sure this only applies to this folder.

Click ok - apply - ok - ok and then test it.

You may also want to check the deny permissions- only give yourself the bare minimum of security that does what you want and deny what else you can - keep your site safe!

See how you go..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top