Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

FSO.DeleteFolder Permission Error

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
OblivionSY
Asked:
OblivionSY
  • 3
  • 2
1 Solution
 
SlimshaneeyCommented:
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
 
OblivionSYAuthor Commented:
How does one go about doing that? It will need to work from multiple machines too.
0
 
SlimshaneeyCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
OblivionSYAuthor Commented:
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
 
SlimshaneeyCommented:
Im not certain, but I dont think so...
0
 
NandhiniCommented:
you may get that error if the resource used by the file is not destroyed properly
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now