Title:
fileWrite() not equivalent to <cffile action="write"...> as does not support a "mode" parameter
| View in TrackerStatus/Resolution/Reason: To Fix//BugReVerified
Reporter/Name(from Bugbase): Tim Saunders / ()
Created: 09/03/2018
Components: File Management, CFFile
Versions: 11.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: 11,0,14,307976 /
Priority/Frequency: Normal / Some users will encounter
Locale/System: UK English / CentOS 7.2
Vote Count: 2
Problem Description:As far as I can tell I can't set the permissions of a file I create in cfscript without first creating the file and then using fileSetAccessMode()
Steps to Reproduce:
<!--- works fine --->
<cffile action="write" file="file" output="content" mode="664">
<!--- creates file with wrong access mode, fileWrite() does not support a mode parameter --->
<cfscript>
fileWrite( file, content, '664' );
</cfscript>
Actual Result: fileWrite() creates files with incorrect access modes
Expected Result: fileWrite() should create files with the correct access mode
Any Workarounds: Use tag function, but cfscript shouldn't be 2nd class
Attachments:
Comments: