I'm running ColdFusion 2016 Std. on Windows Server 2012 R2 Std. There is no Active Domain/Group Policy anything like that running, as I am the one and only person with access to the webserver (small company). I'm logged in as Administrator (locally), and when I look at the properties on the "ColdFusion Application Server" service (under services.msc) the user on the Log On tab is set to: .\Administrator
. If I open a new Windows Explorer window and type \\vm00\KCX\cftarget
in the address bar (or replace vm00
with the IP address of target machine), it goes straight to it with no issue. I can also create/edit/delete files with no issues on the remote (UNC) share. It is shared with "Everyone" from the remote machine (Windows Server 2008 R2 Std.), and to ensure no issues, I deliberately added \NUC07\Administrator
under "Special Permissions" with Full Control (all checkboxes checked) on the remote share (KCX), so that there could be no confusion as to whether the remote admin is included in "Everyone."
Here is my code (originally I used vm00
in place of the IP address, but that produces the same error):
<cfset source="C:\ALT\cfsource\" />
<cfset dest="\\192.168.0.10\KCX\cftarget\" />
<cfif DirectoryExists(source)>
SOURCE DIR EXISTS.
<cfelse>
SOURCE DIR DOES NOT EXIST.
</cfif>
<br />
<cfif DirectoryExists(dest)>
DEST DIR EXISTS.
<cfelse>
DEST DIR DOES NOT EXIST.
</cfif>
<cffile
action="copy"
source="#source#cfdata.txt"
destination="#dest#"
/>
DONE.
The output of this code is:
SOURCE DIR EXISTS.
DEST DIR DOES NOT EXIST.500 Error:
Attribute validation error for tag CFFILE.
The value of the attribute destination, which is currently //192.168.0.10/KCX/cftarget/, is invalid.
The error occurred in testcffile.cfm: line 21 (line 21: source="#source#cfdata.txt")
and yes, the text file does exist, I created it manually.
It seems I'm not the only person who's had trouble with CFFILE action=copy
. If anyone has any kind of insight as to what I might be doing wrong, please let me know. Thanks in advance!