?
Solved

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

Posted on 2010-11-19
5
Medium Priority
?
600 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 500 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

862 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