COLDFUSION | Troubleshooting ‘The value of the attribute source … is invalid’ for CFFILE tag

A colleague and I were migrating code to a new CF9 development environment. We were testing a page that used <cffile> tag to move and rename a file as follows:

<CFSET ThisSource = “\\fubarserver\share$\newyork\aaa.cfm“>
<CFSET ThisDestination = “\\fubarserver\share$\chicago\archive\110407-aaa.cfm“>
ACTION = “rename”
SOURCE = “#ThisSource#”
DESTINATION = “#ThisDestination#”>

The page gave the following error:

The value of the attribute source, which is currently “\\fubarserver\share$\newyork\aaa.cfm“, is invalid.

This made no sense, as we could clearly establish that path was valid and assessible to the website and the ColdFusion instance. Turns out the message is very misleading: the problem was file systems permissions. The CF service account only had ‘read&execute’ permissions on the source directory, and that was the issue. Apparently, even though the ‘rename’ was coded to move the file to a path where the CF service account had ‘modify’ permissions, it required that for any rename operation it should also have ‘modify’ permissions to the source directory; when I set the source directory permissions accordingly, the code executed fine.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s