Solved

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

Posted on 2010-11-19
5
594 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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