Solved

FSO.DeleteFolder Permission Error

Posted on 2004-03-30
8
390 Views
Last Modified: 2008-02-07
I have a script which can create a folder and add a file into this folder, this works fine. But i need to have another script to reverse this, ie delete this folder and the file inside.

I have used the FSO.DeleteFolder(Server.MapPath(MyFolder), True) to remove the folder, (and as i understand all files in the folder) however, i get a "Permission Denied" error. Presumably i need to give access rights to the script so it can delete folders. How can this be done?

0
Comment
Question by:OblivionSY
  • 3
  • 2
8 Comments
 
LVL 11

Expert Comment

by:Slimshaneey
ID: 10712318
In the parent folder, you need to give IUSR_machinename rights over all files and folders in that direxctory. You should then be able to delete...
0
 
LVL 3

Author Comment

by:OblivionSY
ID: 10712441
How does one go about doing that? It will need to work from multiple machines too.
0
 
LVL 11

Expert Comment

by:Slimshaneey
ID: 10712462
On the machine it self, go to the parent folder. Right click it, select properties, then Security, there is a list of users. You will need then to add IUSR_whetverthenameofyourmachineis to that list and give all nescessary rights to that folder and its contents,
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 3

Author Comment

by:OblivionSY
ID: 10712470
Ahhh, one thing i should have said is, i dont host the pages, they are on a webserver somewhere. So i cannot access that information.

Is there any way for the dynamically created folders to be dynamically deleted?

 When the folder is created, is there anyway to set the permissions then that anyone can delete it?
0
 
LVL 11

Accepted Solution

by:
Slimshaneey earned 50 total points
ID: 10712476
Im not certain, but I dont think so...
0
 
LVL 1

Expert Comment

by:Nandhini
ID: 10958329
you may get that error if the resource used by the file is not destroyed properly
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question