Solved

Copy file fails with Permission Denied

Posted on 2000-04-19
2
581 Views
Last Modified: 2012-08-13
I am trying to copy a recently uploaded file from one directory to another.

This is the code:

 Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd)&"fpdb\"&filename)
 
 For i = 1 to LenB(value)
       MyFile.Write chr(AscB(MidB(value,i,1)))
 Next
 
 MyFile.Close
 Set MyFile=Nothing
 Set ScriptObject=Nothing
 Set UploadRequest=Nothing
 
response.write server.mappath("fpdb/"&filename)
response.write server.mappath("uploads/"&filename)

Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile server.mappath("fpdb\"&filename), server.mappath("uploads\"&filename), True
Set FSO = Nothing

And this is what I get:

Microsoft VBScript runtime error '800a0046'

Permission denied

/outputFile.asp, line 52

Line 52 is the FSO.CopyFile line.

Thanks!
0
Comment
Question by:dudez2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
makerp earned 15 total points
ID: 2734357
you need to give the ISUR_<machine_name> account RWD rights on the dir that you want to write to.

if this is a server then ask the system admin. they will know what you mean if you say the web server account needs rwd permissions on the dir in question.
0
 

Author Comment

by:dudez2
ID: 2736560
Thanks. Yes, this is a hosted web, so I will ask them...
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 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