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
Solved

Copy file fails with Permission Denied

Posted on 2000-04-19
2
580 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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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 recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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 …

790 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