tracker issue : CF-4204901

select a category, or use search below
(searches all categories and all time range)

Cannot Perform File Operations Between VFS (RAM) AND S3

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): Paul M. / ()

Created: 07/31/2019

Components: File Management, VFS-S3

Versions: 2018

Failure Type: Non Functioning

Found In Build/Fixed In Build: 2018.0.04.314546 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Problem Description: 
Cannot perform file operation (Copy/move/others?) between the VFS (RAM drive) and S3. This is happening when the AWS key and secret are used within the source file path as described in docs: s3://AWSKey:AWSSecret@myS3Bucket/test.txt

The error indicates CF is stripping the S3 Secret from the file path.  

Steps to Reproduce: 
Place a file into VFS and try to move/copy it to an S3 bucket.  For example, (Windows):

<!--- Grab a test file and copy to RAM drive --->
<cfif fileExists("c:\\test.txt")>
	<cfset filecopy("c:\\test.txt","ram:\\test.txt")>
	<!--- Try to copy the file from RAM to S3 --->
	<cfif fileExists("ram:\\test.txt")>
		<cfset filecopy("ram:\\test.txt","s3://AWSKey:AWSSecret@myS3Bucket/test.txt")>

Actual Result:
CF produces an error and it appears as if the AWS secret has been stripped:
"Error occurred while copying the file from source ram:///test.txt to s3://AWSKey:@myS3Bucket/test.txt"
" ram:///test.txt (The filename, directory name, or volume label syntax is incorrect) "

Expected Result:
The file should be copied/moved with no error

Any Workarounds:
The file can be copied/moved to a normal system drive and copied/moved to S3 from there:
<cfif fileExists("c:\\test.txt")>
    <cfset filecopy("c:\\test.txt","s3://AWSKey:AWSSecret@myS3Bucket/test.txt")>