[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Access is denied (error 5) in CFFile

Posted on 2004-09-06
5
Medium Priority
?
1,035 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
What You Need to Know when Searching for a Webhost Provider
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

826 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