While this quick troubleshooting tip is aimed at ColdFusion, it actually has some application to other scripting languages when performing file system operations.

If <cffile> throws a "source attribute invalid" error, many times, you might be surprised to find that the value in the source attribute is actually valid. So what gives!

Well, in the case of ColdFusion, if your destination directory does not exists, it may throw this error. Confusing, yes.

But, more likely, you have a file system permissions issue. Your first response might be to make your destination directory fully writable by owner, group, others. However, in the context of a file rename/move, it's easy to forget that we are also modifying the directory contents of the source folder (by moving a file away from it). So, you need to make sure that your web server has write access to the source folder.


Leave a Reply

Your email address will not be published. Required fields are marked *