>From my experience, any CFILE or CFDIRECTORY usage where you will be
accessing another server requires 1) User that CF runs as on the web server
to have ADMIN rights on the other server(s).
Example:

IF coldfusion runs as a local administrator on the web server, an account
with the same name and password must exist on the other servers local domain
AND have admin rights.

What I did was create a NEW user account on the web server with admin
rights, change the CF services to run as that account, then create the same
account on the other server.  IF you the two servers are in the same domain,
you can use a domain account rather than a local domain account.

Matt Knight
----- Original Message -----
From: "Christopher A Hayward" <[EMAIL PROTECTED]>
To: "CFList" <[EMAIL PROTECTED]>
Sent: Friday, June 01, 2001 11:25 AM
Subject: cfdirectory...


> OK guys I seem to be having a disagreement with a co-worker on using the
> cfdirectory and trying to grab data from another server.  He's read that
> you must allow the CF account access to the directory that he's trying
> to get his data and I think you must use the IIS anonymous user.  Of
> course, we could be going in a completely wrong direction so any insight
> would be greatly appreciated.
>
> Here's the code in case there's something wrong with it:
>
> <HTML>
> <HEAD>
>     <TITLE>List Directory Information</TITLE>
> </HEAD>
>
> <BODY>
> <H2>List Directory Information</H2>
> <cf_act_browser>
> <cfset attributes.dirLocation =
> "\\server1\eucnet\inetpub\wwwroot\test\chayw2">
> <cfoutput>#attributes.dirLocation#</cfoutput>
> <CFDIRECTORY
>     DIRECTORY="#attributes.dirLocation#"
>     NAME="mydirectory"
>     SORT="size ASC, name DESC, datelastmodified">
>
> <TABLE>
> <TR>
>     <TH>Name</TH>
>     <TH>Modified</TH>
> </TR>
> <CFOUTPUT QUERY="mydirectory">
>         <cfif mydirectory.type EQ "File">
>                 <cfset fileLocation =
> ReplaceNoCase(attributes.dirLocation,"v:","server2/shareddb")>
>                 <cfset fileLocation =
> ReplaceNoCase(fileLocation,"\","/","ALL")>
>                 <cfset fileLocation = #fileLocation#&#mydirectory.name#>
>                 <TR>
>                     <TD><a href="file:////#fileLocation#" <cfif
> BrowserType EQ
> "MSIE">target="_blank"</cfif>>#mydirectory.name#</a></TD>
>                     <TD>#mydirectory.type#</TD>
>                 </TR>
>         </cfif>
> </CFOUTPUT>
> </TABLE>
>
> </BODY>
> </HTML>
> --
> Sincerely,
>
> Chris Hayward
> Systems Engineer
> JCPenney Direct Marketing Services
> 972.881.6545 voice
> 972.672.2248 cell


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to