?
Solved

Access is denied (error 5) in CFFile

Posted on 2004-09-06
5
Medium Priority
?
1,023 Views
Last Modified: 2013-12-24
Hi Guys!

I'm getting this error:

Error processing CFFILE Unable to copy file 'C:\Temp\_AM\customers\com_add_dts_connection.cfm' to path 'C:\Temp\_AM\activities'. Error: Access is denied. (error 5).The error occurred while processing an element with a general identifier of (CFFILE), occupying document position (86:6) to (86:81) in the template file C:\INETPUB\WWWROOT\HHSS_ROOT\_PM\DBABBITT-TEST\NOTEPAD.CFM.

My web root is C:\INETPUB\WWWROOT\HHSS_ROOT\

I am using IIS and CF Server. Here is the version dump:
Server Product: ColdFusion Server
Version: 5, 0, 0, 0
Edition: Enterprise
Operating System: Windows NT
OS Version: 5.0, Service Pack 4
OS Build Number: 2195

Here is the offending tag:
<cffile action="COPY" source="#CopySource#" destination="#CopyDestination#">

If I change it to this:
&lt;cffile action="COPY" source="#CopySource#" destination="#CopyDestination#"&gt;<cfabort>

It outputs like this:
<cffile action="COPY" source="C:\Temp\_AM\customers\com_add_dts_connection.cfm" destination="C:\Temp\_AM\activities">

How do I get rid of the Access Denied error?
0
Comment
Question by:dbabbitt
[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
5 Comments
 
LVL 18

Expert Comment

by:Plucka
ID: 11993496
Hi dbabbitt,

Right click on the document and ensure that user everyone has full permisions.

This type of error normally occurs when the file has been copied from somewhere else and the permissions are invalid for the current machine.

Regards
Plucka
0
 
LVL 14

Expert Comment

by:Renante Entera
ID: 11993512
Hello dbabbitt!

How about adding an attribute to the <cffile>.

So you will have your code like this :

<cffile action="COPY" source="C:\Temp\_AM\customers\com_add_dts_connection.cfm" destination="C:\Temp\_AM\activities" mode="777">

Note : Be sure that source exists and the destination has been created.

For your reference on <cffile action="copy">, visit this site :
   
   http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p29.htm#wp3542558


Goodluck!
eNTRANCE2002 :-)
0
 
LVL 17

Accepted Solution

by:
anandkp earned 2000 total points
ID: 11994406
DESTINATION
Required. The full path name of the directory where the copy of the file will be saved. If you do not specify a file name, you must include the trailing slash. On Windows, use the backward slash (\). On UNIX, use the forward slash (/).

so as u can see ur code shld look like
<cffile action="COPY" source="C:\Temp\_AM\customers\com_add_dts_connection.cfm" destination="C:\Temp\_AM\activities\">

PS : note the TRAILING slash for destination ...

K'Rgds
Anand
0
 

Author Comment

by:dbabbitt
ID: 11995029
One tiny change did the trick:
<cffile action="COPY" source="#CopySource#" destination="#CopyDestination#\">
0
 
LVL 17

Expert Comment

by:anandkp
ID: 11995106
way to go :)
0

Featured Post

Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

Question has a verified solution.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

752 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