{"id":446,"date":"2011-11-28T16:25:44","date_gmt":"2011-11-28T16:25:44","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=446"},"modified":"2011-11-28T16:27:39","modified_gmt":"2011-11-28T16:27:39","slug":"coldfusion-cffile-rename-source-attribute-invalid","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/coldfusion-cffile-rename-source-attribute-invalid\/","title":{"rendered":"ColdFusion CFFile rename &#8211; source attribute invalid"},"content":{"rendered":"<p>While this quick troubleshooting tip is aimed at ColdFusion, it actually has some application to other scripting languages when performing file system operations.<\/p>\n<p>If <a href=\"http:\/\/www.google.com\/url?sa=t&amp;rct=j&amp;q=cffile+rename+coldfusion+9&amp;source=web&amp;cd=1&amp;ved=0CCAQFjAA&amp;url=http%3A%2F%2Fhelp.adobe.com%2Fen_US%2FColdFusion%2F9.0%2FCFMLRef%2FWSc3ff6d0ea77859461172e0811cbec22c24-7377.html&amp;ei=erbTTtaPIeXq0gHG17AS&amp;usg=AFQjCNG9zAui9j0I2JcVzt4nOPNGuRLqvw\"><em>&lt;cffile&gt;<\/em><\/a> throws a &quot;<strong>source attribute invalid<\/strong>&quot; error, many times, you might be surprised to find that the value in the source attribute is actually valid. So what gives!<\/p>\n<p>Well, in the case of ColdFusion, if your destination directory does not exists, it may throw this error. Confusing, yes.<\/p>\n<p>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 <em>rename\/move<\/em>, it&#39;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 <strong>write access to the source<\/strong> folder.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While this quick troubleshooting tip is aimed at ColdFusion, it actually has some application to other scripting languages when performing file system operations. If &lt;cffile&gt;&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[34],"tags":[144],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/446"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=446"}],"version-history":[{"count":3,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/446\/revisions"}],"predecessor-version":[{"id":449,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/446\/revisions\/449"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}