Solved

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

Posted on 2010-11-19
5
597 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

728 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