Copy link to clipboard
Copied
will this work
<cfset filename = "\\mule\ppc_margin\export\#DateFormat(now(), "yyyymmdd")&'-'&TimeFormat(now(), "HHmmss")#.xml">
<cfdump var="#filename#">
<cffile action='Write' file="#filename#" output='#data.xmlData[1]#'>
I keep getting acces denied
ah ok,do you know how to give permission to CF9 to write on separate servers, Im not expert in windows folders permissions
btw is it ok to alias in filenames instead of mappings like c: ext?
http://lmgtfy.com/?q=setting+directory+permissions+on+windows
And, yeah, using a UNC is fine.
--
Adam
Copy link to clipboard
Copied
Does the account CF is using have permissions to that resource? By default, it won't have.
--
Adam
Copy link to clipboard
Copied
ah ok,do you know how to give permission to CF9 to write on separate servers, Im not expert in windows folders permissions
btw is it ok to alias in filenames instead of mappings like c: ext?
Copy link to clipboard
Copied
ah ok,do you know how to give permission to CF9 to write on separate servers, Im not expert in windows folders permissions
btw is it ok to alias in filenames instead of mappings like c: ext?
http://lmgtfy.com/?q=setting+directory+permissions+on+windows
And, yeah, using a UNC is fine.
--
Adam
Copy link to clipboard
Copied
ahahahaha google:
I tried the UNC path and confirmed with my IT guy that anything can write to server.
but I still get this: so strange, I even rdp'ed to the calling server and put \\server\export\ into explorer and open fine
Service error debug:
faultCode:Server.Processing faultString:'Unable to invoke CFC - An error occurred when performing a file operation Write on file \\mule\ppc_FIS_Margin\export\rfm20110914006.xml.' faultDetail:'The cause of this exception was: java.io.FileNotFoundException: \\server\export\rfm20110914006.xml (Access is denied).'
Copy link to clipboard
Copied
If that's the case then I'm afraid your IT guy is wrong.
Make sure he knows that the user account under which the CF service runs has full network permissions over the share. As Adam says, it does not by default - even on a base install, it would be running as Local System, which does *not* have said permissions.
If he didn't need to change anything, I'd be very surprised if it has permissions.
Copy link to clipboard
Copied
I think you IT guy is confusing the permissions on the destination with the capabilities of the source. He may be right in saying that the
server and UNC that you are trying to write to allows everyone to write to it. But what is doesn't realize that "everyone" doesn't really mean "everyone" - it really means "everyone who is allowed to even try to get to the network." If an account on another server does not have network access then it is not going to get to your destination server because it cannot even get to the network. On Windows before Windows Server 2008, the default service account that services like ColdFusion run under, that account does not have AND CANNOT BE GIVEN network privs. So you need to create a new domain login for all of the CF services to run under, and then be sure that that domain account is given access to the shares on the remote servers that it needs to access. In your case, since it sounds like the IT guy opened up the share that you are trying to access, then all he probably needs to do is to create the domain account for CF to use. Once you change the logins for the services, you need to restart each of them. If you don't really want everyone in the world to get to your remote server share, then the IT guy can restrict its access to just the account that CF is running under.
In Windows server 2008 this does not seem to be a problem, since the local services account now has network access.
-reed
Copy link to clipboard
Copied
One of the best answers I ever got mate, thx so much!!!!