Microsoft Vbscript Runtime Error 800a0046 Permission Denied Delete File
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us asp createtextfile permission denied Learn more about Stack Overflow the company Business Learn more about hiring developers vbs permission denied 800a0046 or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack fso.deletefile permission denied Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Permissions error on FSO DeleteFile/MoveFile up vote
Filesystemobject
2 down vote favorite I'm trying to delete/move a file using classic asp fso but I'm getting this error: Microsoft VBScript runtime error '800a0046' Permission denied The file is located in c:\files\test\file.txt and ultimately I want to move it to c:\archive\file.txt I started out with Move but I got the error. Then I split it up into Copy and Delete. The copying went fine but still the same error on Delete. I ruled out the Delete method because I was able to use Delete on the file in the 'archive' folder using this code: dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("C:\archive\file.txt") f.Delete set f=nothing set fs=nothing I also double-checked the permissions on both folders and they're exactly the same for IIS_IUSRS: Read&Execute, List folder contents, Read, Write are checked. I tried giving Modify rights as well but that made no difference. Finally, I checked the file's attributes and it came back as 32 (Archive). I also tried to force the delete: fso.DeleteFile FileName, true file-io permissions fso share|improve this question edited Apr 24 '14 at 21:44 Tshepang 4,7041059103 asked Feb 7 '12 at 21:39 greener 2,59352757 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted IIS_USRS folder permissions had to specifically include 'Delete' from the 'Advanced' dialog in Windows. share|improve this answer answered Feb 8 '12 at 18:26 greener 2,59352757 Saved my life! Thanks! –sean.boyer Dec 22 '14 at 19:55 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email a
Unanswered Topics Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics Create/Delete files w/ASP using FileSystemObject User Name Remember Me? Password Reminder Password Register Register | FAQ | Members List | Calendar | Today's Posts | Search Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 Search Forums Show Threads Show Posts Advanced Search Find All Thanked Posts Go to Page... Welcome to the p2p.wrox.com Forums. You are currently viewing the Classic http://stackoverflow.com/questions/9184377/permissions-error-on-fso-deletefile-movefile ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is http://p2p.wrox.com/classic-asp-basics/2317-create-delete-files-w-asp-using-filesystemobject.html fast, simple and absolutely free . Thread Tools Display Modes #1 (permalink) July 31st, 2003, 08:13 PM John K. King Authorized User Join Date: Jun 2003 Location: Sheridan, OR, USA. Posts: 53 Thanks: 0 Thanked 0 Times in 0 Posts Create/Delete files w/ASP using FileSystemObject Hi: I'm trying to create and delete text files from an ASP page. In the big picture, I want to run an executable against a created text file (the input file), that executable creates an output text file, I'll capture the content of the output file, and delete both text files. I can create a file successfully. For now, I'm using the web server's TEMP directory and creating a temporary file name using methods of the FileSystemObject. However I cannot delete it. Permission denied. Microsoft VBScript runtime error '800a0046' Permission denied The system admin doesn't think it is a permissions problem. Any ideas are appreciated. I've included a sample page below. Nothing special about it. Should be able to slap it into the body of an ASP page and go. Thanks, JK <% Call CreateDeleteFile %> <% Sub CreateDeleteFile Dim fsoLocal Dim txtstrmL
360 games PC games https://support.microsoft.com/en-us/kb/941190 Windows games Windows phone games Entertainment All Entertainment Movies & TV Music Business & Education Business Students & educators https://bytes.com/topic/asp-classic/answers/53795-file-permission-problem Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet permission denied Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All microsoft vbscript runtime Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
your question and get tips & solutions from a community of 418,590 IT Pros & Developers. It's quick & easy. File permission problem P: n/a Richard Muller Hi, I new to ASP. I have a problem with an ASP script opening a file for writing on my server. Here's how I got to this error: I downloaded a neat FileUpload ASP example from http://www.asp101.com/articles/jacob/scriptupload.asp. I copied to my wwwroot folder on my Win2000AS/SP4 server: - main .asp file - a subordinate .asp file that the main file references; and - a webform .html file Because of the problem I encountered I added a number of debugging statements to the script. Then I invoked the webform from a workstation using IE6.0 by referencing the server's IP address appended with webform ..html file's name. I completed the form with: - Name: RLM - File: F:\_Projects_Current\_Projects_ASP\Test\Upload_tes t.txt and clicked Submit. I got the following error: Microsoft VBScript runtime (0x800A0046) Permission denied /upload.asp, line 137 The offending line is: Set oFile = oFS.CreateTextFile(sPath & FileName, True) I commented out this line, which then yielded: Thank you for your upload RLM Saving to folder D:\UploadedFiles\ Validating existence of folder D:\UploadedFiles\ Saving data to D:\UploadedFiles\Upload_test.txt File Uploaded: Upload_test.txt Size: 21 bytes Type: text/plain Any ideas on how I can fix this? -- Regards, Richard I can resist everything except temptation Lord Darlington in "Lady Windermere's Fan" by Oscar Wilde Jul 19 '05 #1 Post Reply Share this Question 11 Replies P: n/a Ray at Assuming you're using anonymous access on your site (the default), you'll have to give IUSR_