?
Solved

Copy file fails with Permission Denied

Posted on 2000-04-19
2
Medium Priority
?
584 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 45 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

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

777 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