Solved

Accessing the database server from the web server with Coldfusion CFDIRECTORY/CFFILE

Posted on 2010-11-19
5
593 Views
Last Modified: 2012-05-10
Greetings, I have a peculiar coldfusion and CFDIRECTORY/CFFILE  file access problem. First, the situation:  This is a tale of two servers, the main one which runs the websites, and the db server. There are shared network folders between them.  To upload files such as updated webpages worked on away from the server, the files are ftp’d from the local programmer’s computer to the database server.They are then dragged & dropped from the shared folder into the main web server.There is no direct ftp path from the local programmer’s computer to the main web server.  
      The database server has a large deposit of pdf files that needs to be accessed from the main web server, without the time consuming task of transferring them manually. I can run a coldfusion program using CFDIRECTORY that works with shared network drives that originate from the main web server, but will not access shared network drives that originate from the database server.  On the database server, I can’t get the pdf files into a shared network drive that originates from the web server, which likely cancels the possibility of using a separate windows-system program that might automatically transfer the pdf files from a local directory on the db server into a shared folder.  I’m not sure if this needs permission from the database server to allow this type of access, or if this is at all possible, or maybe I need a few lessons on network drives. I don’t know if I’m simply overlooking something or if this is at all possible.  Thanks.
0
Comment
Question by:malachi223
  • 3
  • 2
5 Comments
 
LVL 52

Assisted Solution

by:_agx_
_agx_ earned 125 total points
ID: 34184261
IF I'm understanding correctly ... you have ColdFusion running on one server ( let's call it Server A ). The pdf files you want to access are on another server ( Server B ).  So on Server A, you created a mapped network drive pointing to Server B.  Correct?

Server A   =>   [Drive H:]  ... is mapped to...   \\ServerB\folderWithThePDFFiles

The CF service runs under the "System" account by default. "System" has few permissions and IIRC can't access networked drives.  The CF service has to be running under an account with permissions to your networked drive.  
0
 
LVL 1

Accepted Solution

by:
malachi223 earned 0 total points
ID: 34200813
Thank you for the reply.  Your comment was extremely helpful, not only because it gave a summary of how to resolve the situation, but it gave me good keywords to search for a solution.   Using a windows server, I clicked through start -> Administration Tools -> Services -> right clicked on ColdFusion Application Server -> Properties -> Log on -> clicked the radio button to ‘this account’  instead of the default ‘local system account’ which only allows ColdFusion to access files on the local computer, and then logged in as the server administrator.  After doing that I had to stop and restart the CF app server, after which my ColdFusion CFDIRECTORY program was able to access the shared network folders containing files from the db server.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 34202115
Glad it's working.  But you don't want to permanently run CF under the Admin account (for security reasons).  It's better to establish a separate windows account and give it the minimum permissions needed for this task. Then run the CF server under that account.  
0
 
LVL 52

Expert Comment

by:_agx_
ID: 34202130
>> Zones:  Web Servers, Application Servers

Btw:  If you have future questions about CF, they'll get more/faster attention if you include one of the CF zones when posting :)

Examples:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Cold_Fusion_Markup_Language/
http://www.experts-exchange.com/Software/Server_Software/Web_Servers/ColdFusion/

0
 
LVL 1

Author Closing Comment

by:malachi223
ID: 34399166
This required very specific knowledge of how ColdFusion file IO and accessibility.  I needed to first understand if the solution was possible, what part of cf administration had to be changed, and to what.  Most of this I was able to find on my own after I was given a good keyword to search under.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows Server with multiple sites and SSL 14 67
SCCM vs Windows server 5 82
Web Site Hosting 10 89
How can i point a subdomain to directory? 5 30
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question