Solved

Access is denied (error 5) in CFFile

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

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
iis reverse proxy virtual directory 8 130
cloud web Service looking for a home... 3 100
VPN Dedicated IP address question 7 43
http to https 3 38
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…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

943 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

18 Experts available now in Live!

Get 1:1 Help Now