Solved

Access is denied (error 5) in CFFile

Posted on 2004-09-06
5
1,009 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
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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 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