Solved

Copy file fails with Permission Denied

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now